diff --git a/lamp/data/lamp-056.json b/lamp/data/lamp-056.json new file mode 100644 index 0000000000000000000000000000000000000000..3a3a5f7dacd2cda9d9f73db89449f599ea2a788b --- /dev/null +++ b/lamp/data/lamp-056.json @@ -0,0 +1,109 @@ +{ + "id": "lamp-056", + "difficulty": 3, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 40, + "y": 40 + }, + "target": { + "x": 108.98, + "y": -16.5 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 80, + "width": 80, + "height": 40 + }, + { + "x": 40, + "y": 120, + "width": 80, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": 80, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 3, + "segments": [ + { + "length": 70 + }, + { + "length": 90 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -65 + }, + { + "joint": 2, + "angle": 10 + }, + { + "joint": 3, + "angle": -170 + } + ] + }, + "legacy_answer": [ + -65, + 10, + -170 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-056\n- segment_count: 3\n- arm_base: (40.0, 40.0)\n- target: (108.98, -16.5)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=70\n- joint 2: length=90\n- joint 3: length=50\n- obstacles:\n- wall_1: type=stair, pattern=warning_stripes\n part 1: x=0, y=80, width=80, height=40\n part 2: x=40, y=120, width=80, height=40\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=80, y=80, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-057.json b/lamp/data/lamp-057.json new file mode 100644 index 0000000000000000000000000000000000000000..58326a7e402eb497be2f135fbbafaf49ed97af72 --- /dev/null +++ b/lamp/data/lamp-057.json @@ -0,0 +1,96 @@ +{ + "id": "lamp-057", + "difficulty": 3, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 120, + "y": 0 + }, + "target": { + "x": 210.62, + "y": 65.39 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 120, + "y": 40, + "width": 80, + "height": 40 + }, + { + "x": 160, + "y": 80, + "width": 80, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 3, + "segments": [ + { + "length": 50 + }, + { + "length": 90 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 20 + }, + { + "joint": 2, + "angle": 15 + }, + { + "joint": 3, + "angle": 150 + } + ] + }, + "legacy_answer": [ + 20, + 15, + 150 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-057\n- segment_count: 3\n- arm_base: (120.0, 0.0)\n- target: (210.62, 65.39)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=90\n- joint 3: length=50\n- obstacles:\n- wall_1: type=stair, pattern=warning_stripes\n part 1: x=120, y=40, width=80, height=40\n part 2: x=160, y=80, width=80, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-058.json b/lamp/data/lamp-058.json new file mode 100644 index 0000000000000000000000000000000000000000..e040b94167b24ba26d1d92dbec2c3a645cdbd8bc --- /dev/null +++ b/lamp/data/lamp-058.json @@ -0,0 +1,115 @@ +{ + "id": "lamp-058", + "difficulty": 3, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 40, + "y": 0 + }, + "target": { + "x": 116.34, + "y": 15.23 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": -40, + "y": 40, + "width": 80, + "height": 40 + }, + { + "x": -40, + "y": 40, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 120, + "y": 40, + "width": 80, + "height": 40 + }, + { + "x": 160, + "y": 80, + "width": 80, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 3, + "segments": [ + { + "length": 90 + }, + { + "length": 50 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 65 + }, + { + "joint": 2, + "angle": -100 + }, + { + "joint": 3, + "angle": -20 + } + ] + }, + "legacy_answer": [ + 65, + -100, + -20 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-058\n- segment_count: 3\n- arm_base: (40.0, 0.0)\n- target: (116.34, 15.23)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=50\n- joint 3: length=50\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=-40, y=40, width=80, height=40\n part 2: x=-40, y=40, width=40, height=120\n- wall_2: type=stair, pattern=warning_stripes\n part 1: x=120, y=40, width=80, height=40\n part 2: x=160, y=80, width=80, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-059.json b/lamp/data/lamp-059.json new file mode 100644 index 0000000000000000000000000000000000000000..5363434f6b706dbd3e8d01de7142390091da41a9 --- /dev/null +++ b/lamp/data/lamp-059.json @@ -0,0 +1,99 @@ +{ + "id": "lamp-059", + "difficulty": 4, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 120, + "y": 40 + }, + "target": { + "x": 208.06, + "y": -51.97 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": -40, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 4, + "segments": [ + { + "length": 90 + }, + { + "length": 90 + }, + { + "length": 50 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -25 + }, + { + "joint": 2, + "angle": -10 + }, + { + "joint": 3, + "angle": -180 + }, + { + "joint": 4, + "angle": -130 + } + ] + }, + "legacy_answer": [ + -25, + -10, + -180, + -130 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-059\n- segment_count: 4\n- arm_base: (120.0, 40.0)\n- target: (208.06, -51.97)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=90\n- joint 3: length=50\n- joint 4: length=50\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=80, y=-40, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-060.json b/lamp/data/lamp-060.json new file mode 100644 index 0000000000000000000000000000000000000000..d2ac1ad3eb0693b72c1ed38aef4b27892db67c07 --- /dev/null +++ b/lamp/data/lamp-060.json @@ -0,0 +1,94 @@ +{ + "id": "lamp-060", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": -80, + "y": 80 + }, + "target": { + "x": -18.58, + "y": 37.39 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "block", + "pattern": "warning_stripes", + "parts": [ + { + "x": -80, + "y": 120, + "width": 80, + "height": 80 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 0, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 50 + }, + { + "length": 70 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 30 + }, + { + "joint": 2, + "angle": -75 + } + ] + }, + "legacy_answer": [ + 30, + -75 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-060\n- segment_count: 2\n- arm_base: (-80.0, 80.0)\n- target: (-18.58, 37.39)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=70\n- obstacles:\n- wall_1: type=block, pattern=warning_stripes\n part 1: x=-80, y=120, width=80, height=80\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=0, y=0, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-061.json b/lamp/data/lamp-061.json new file mode 100644 index 0000000000000000000000000000000000000000..cf2fdaa67b508841cfd29b67d20047a0b29bf44f --- /dev/null +++ b/lamp/data/lamp-061.json @@ -0,0 +1,127 @@ +{ + "id": "lamp-061", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 0, + "y": 120 + }, + "target": { + "x": 98.46, + "y": 89.14 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 160, + "width": 80, + "height": 40 + }, + { + "x": 0, + "y": 160, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 0, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 50 + }, + { + "length": 50 + }, + { + "length": 70 + }, + { + "length": 110 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -90 + }, + { + "joint": 2, + "angle": 160 + }, + { + "joint": 3, + "angle": -85 + }, + { + "joint": 4, + "angle": 35 + }, + { + "joint": 5, + "angle": 10 + } + ] + }, + "legacy_answer": [ + -90, + 160, + -85, + 35, + 10 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-061\n- segment_count: 5\n- arm_base: (0.0, 120.0)\n- target: (98.46, 89.14)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=50\n- joint 3: length=70\n- joint 4: length=110\n- joint 5: length=50\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=0, y=160, width=80, height=40\n part 2: x=0, y=160, width=40, height=120\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=0, y=0, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-062.json b/lamp/data/lamp-062.json new file mode 100644 index 0000000000000000000000000000000000000000..5a69b5caa73618215e7bc60c8596522000cd36fa --- /dev/null +++ b/lamp/data/lamp-062.json @@ -0,0 +1,100 @@ +{ + "id": "lamp-062", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 40, + "y": 0 + }, + "target": { + "x": 66.56, + "y": -97.95 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 40, + "width": 80, + "height": 40 + }, + { + "x": 80, + "y": 80, + "width": 80, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 120, + "y": -80, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 90 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -5 + }, + { + "joint": 2, + "angle": -125 + } + ] + }, + "legacy_answer": [ + -5, + -125 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-062\n- segment_count: 2\n- arm_base: (40.0, 0.0)\n- target: (66.56, -97.95)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=110\n- obstacles:\n- wall_1: type=stair, pattern=warning_stripes\n part 1: x=40, y=40, width=80, height=40\n part 2: x=80, y=80, width=80, height=40\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=120, y=-80, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-063.json b/lamp/data/lamp-063.json new file mode 100644 index 0000000000000000000000000000000000000000..a03cdc5473153eacec68f89498f7df8fdae9e879 --- /dev/null +++ b/lamp/data/lamp-063.json @@ -0,0 +1,81 @@ +{ + "id": "lamp-063", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 80, + "y": 120 + }, + "target": { + "x": 102.94, + "y": -20.26 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 40, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 90 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -30 + }, + { + "joint": 2, + "angle": -120 + } + ] + }, + "legacy_answer": [ + -30, + -120 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-063\n- segment_count: 2\n- arm_base: (80.0, 120.0)\n- target: (102.94, -20.26)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=110\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=0, y=40, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-064.json b/lamp/data/lamp-064.json new file mode 100644 index 0000000000000000000000000000000000000000..ab2dbc86852dc8b76fec88cdd0cd34d08f50a8d4 --- /dev/null +++ b/lamp/data/lamp-064.json @@ -0,0 +1,133 @@ +{ + "id": "lamp-064", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 120, + "y": 80 + }, + "target": { + "x": 235.53, + "y": 190.07 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 120, + "y": 160, + "width": 80, + "height": 40 + }, + { + "x": 160, + "y": 200, + "width": 80, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": 120, + "width": 80, + "height": 40 + }, + { + "x": 80, + "y": 120, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 110 + }, + { + "length": 50 + }, + { + "length": 110 + }, + { + "length": 90 + }, + { + "length": 70 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 30 + }, + { + "joint": 2, + "angle": -170 + }, + { + "joint": 3, + "angle": -50 + }, + { + "joint": 4, + "angle": 110 + }, + { + "joint": 5, + "angle": 65 + } + ] + }, + "legacy_answer": [ + 30, + -170, + -50, + 110, + 65 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-064\n- segment_count: 5\n- arm_base: (120.0, 80.0)\n- target: (235.53, 190.07)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=110\n- joint 2: length=50\n- joint 3: length=110\n- joint 4: length=90\n- joint 5: length=70\n- obstacles:\n- wall_1: type=stair, pattern=warning_stripes\n part 1: x=120, y=160, width=80, height=40\n part 2: x=160, y=200, width=80, height=40\n- wall_2: type=l_corner, pattern=warning_stripes\n part 1: x=80, y=120, width=80, height=40\n part 2: x=80, y=120, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-065.json b/lamp/data/lamp-065.json new file mode 100644 index 0000000000000000000000000000000000000000..4b2629ed441dfe44a4698243f0df18e8fadcc70e --- /dev/null +++ b/lamp/data/lamp-065.json @@ -0,0 +1,87 @@ +{ + "id": "lamp-065", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 80, + "y": 80 + }, + "target": { + "x": 29.37, + "y": -34.43 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 0, + "width": 80, + "height": 40 + }, + { + "x": 0, + "y": 0, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 110 + }, + { + "length": 70 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -80 + }, + { + "joint": 2, + "angle": -175 + } + ] + }, + "legacy_answer": [ + -80, + -175 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-065\n- segment_count: 2\n- arm_base: (80.0, 80.0)\n- target: (29.37, -34.43)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=110\n- joint 2: length=70\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=0, y=0, width=80, height=40\n part 2: x=0, y=0, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-066.json b/lamp/data/lamp-066.json new file mode 100644 index 0000000000000000000000000000000000000000..603dae134ef93f19c6b3971f29dbc5ee37a4b60d --- /dev/null +++ b/lamp/data/lamp-066.json @@ -0,0 +1,124 @@ +{ + "id": "lamp-066", + "difficulty": 4, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 40, + "y": 40 + }, + "target": { + "x": -59.77, + "y": 297.56 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": -40, + "y": 120, + "width": 80, + "height": 40 + }, + { + "x": 0, + "y": 160, + "width": 80, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": -40, + "y": 200, + "width": 80, + "height": 40 + }, + { + "x": -40, + "y": 200, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 4, + "segments": [ + { + "length": 70 + }, + { + "length": 50 + }, + { + "length": 110 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 150 + }, + { + "joint": 2, + "angle": 165 + }, + { + "joint": 3, + "angle": 105 + }, + { + "joint": 4, + "angle": 70 + } + ] + }, + "legacy_answer": [ + 150, + 165, + 105, + 70 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-066\n- segment_count: 4\n- arm_base: (40.0, 40.0)\n- target: (-59.77, 297.56)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=70\n- joint 2: length=50\n- joint 3: length=110\n- joint 4: length=110\n- obstacles:\n- wall_1: type=stair, pattern=warning_stripes\n part 1: x=-40, y=120, width=80, height=40\n part 2: x=0, y=160, width=80, height=40\n- wall_2: type=l_corner, pattern=warning_stripes\n part 1: x=-40, y=200, width=80, height=40\n part 2: x=-40, y=200, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-067.json b/lamp/data/lamp-067.json new file mode 100644 index 0000000000000000000000000000000000000000..517156dfc384b74d1039e42bf5ff7c6f4141edff --- /dev/null +++ b/lamp/data/lamp-067.json @@ -0,0 +1,118 @@ +{ + "id": "lamp-067", + "difficulty": 4, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 0, + "y": 0 + }, + "target": { + "x": 246.59, + "y": 146.6 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": 40, + "width": 120, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": 80, + "width": 80, + "height": 40 + }, + { + "x": 120, + "y": 120, + "width": 80, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 4, + "segments": [ + { + "length": 110 + }, + { + "length": 110 + }, + { + "length": 110 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 90 + }, + { + "joint": 2, + "angle": 65 + }, + { + "joint": 3, + "angle": 0 + }, + { + "joint": 4, + "angle": -35 + } + ] + }, + "legacy_answer": [ + 90, + 65, + 0, + -35 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-067\n- segment_count: 4\n- arm_base: (0.0, 0.0)\n- target: (246.59, 146.6)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=110\n- joint 2: length=110\n- joint 3: length=110\n- joint 4: length=110\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=80, y=40, width=120, height=40\n- wall_2: type=stair, pattern=warning_stripes\n part 1: x=80, y=80, width=80, height=40\n part 2: x=120, y=120, width=80, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-068.json b/lamp/data/lamp-068.json new file mode 100644 index 0000000000000000000000000000000000000000..ff0b52e3b6f20e78ff50b1192ffbd6a60c0e0deb --- /dev/null +++ b/lamp/data/lamp-068.json @@ -0,0 +1,127 @@ +{ + "id": "lamp-068", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 0, + "y": 80 + }, + "target": { + "x": 12.78, + "y": -67.71 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": -40, + "width": 80, + "height": 40 + }, + { + "x": 80, + "y": 0, + "width": 80, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": -80, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 50 + }, + { + "length": 110 + }, + { + "length": 110 + }, + { + "length": 110 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 175 + }, + { + "joint": 2, + "angle": -40 + }, + { + "joint": 3, + "angle": -165 + }, + { + "joint": 4, + "angle": -5 + }, + { + "joint": 5, + "angle": -120 + } + ] + }, + "legacy_answer": [ + 175, + -40, + -165, + -5, + -120 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-068\n- segment_count: 5\n- arm_base: (0.0, 80.0)\n- target: (12.78, -67.71)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=110\n- joint 3: length=110\n- joint 4: length=110\n- joint 5: length=50\n- obstacles:\n- wall_1: type=stair, pattern=warning_stripes\n part 1: x=40, y=-40, width=80, height=40\n part 2: x=80, y=0, width=80, height=40\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=40, y=-80, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-069.json b/lamp/data/lamp-069.json new file mode 100644 index 0000000000000000000000000000000000000000..9a9b287a75a05484c449b9ddc5f97fc34f450303 --- /dev/null +++ b/lamp/data/lamp-069.json @@ -0,0 +1,105 @@ +{ + "id": "lamp-069", + "difficulty": 4, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": -40, + "y": 120 + }, + "target": { + "x": 75.48, + "y": 52.79 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": -40, + "width": 80, + "height": 40 + }, + { + "x": 0, + "y": -40, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 4, + "segments": [ + { + "length": 50 + }, + { + "length": 110 + }, + { + "length": 50 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -5 + }, + { + "joint": 2, + "angle": 10 + }, + { + "joint": 3, + "angle": -95 + }, + { + "joint": 4, + "angle": -140 + } + ] + }, + "legacy_answer": [ + -5, + 10, + -95, + -140 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-069\n- segment_count: 4\n- arm_base: (-40.0, 120.0)\n- target: (75.48, 52.79)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=110\n- joint 3: length=50\n- joint 4: length=50\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=0, y=-40, width=80, height=40\n part 2: x=0, y=-40, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-070.json b/lamp/data/lamp-070.json new file mode 100644 index 0000000000000000000000000000000000000000..c18523e207a33a00044103036827c6d030b8dbea --- /dev/null +++ b/lamp/data/lamp-070.json @@ -0,0 +1,81 @@ +{ + "id": "lamp-070", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": -40, + "y": 80 + }, + "target": { + "x": 44.22, + "y": 35.21 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_vertical", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": -80, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 50 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 65 + }, + { + "joint": 2, + "angle": -55 + } + ] + }, + "legacy_answer": [ + 65, + -55 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-070\n- segment_count: 2\n- arm_base: (-40.0, 80.0)\n- target: (44.22, 35.21)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=110\n- obstacles:\n- wall_1: type=bar_vertical, pattern=warning_stripes\n part 1: x=0, y=-80, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-071.json b/lamp/data/lamp-071.json new file mode 100644 index 0000000000000000000000000000000000000000..c4568ecf78db8279634821946b8d57bbabba41c1 --- /dev/null +++ b/lamp/data/lamp-071.json @@ -0,0 +1,118 @@ +{ + "id": "lamp-071", + "difficulty": 4, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 120, + "y": -80 + }, + "target": { + "x": 336.74, + "y": -92.39 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 200, + "y": -40, + "width": 80, + "height": 40 + }, + { + "x": 200, + "y": -40, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": -40, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 4, + "segments": [ + { + "length": 90 + }, + { + "length": 90 + }, + { + "length": 50 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 5 + }, + { + "joint": 2, + "angle": -95 + }, + { + "joint": 3, + "angle": 55 + }, + { + "joint": 4, + "angle": 15 + } + ] + }, + "legacy_answer": [ + 5, + -95, + 55, + 15 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-071\n- segment_count: 4\n- arm_base: (120.0, -80.0)\n- target: (336.74, -92.39)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=90\n- joint 3: length=50\n- joint 4: length=110\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=200, y=-40, width=80, height=40\n part 2: x=200, y=-40, width=40, height=120\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=80, y=-40, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-072.json b/lamp/data/lamp-072.json new file mode 100644 index 0000000000000000000000000000000000000000..ecc9968cf7c078505bf5ae37654d99dbf8f6dc24 --- /dev/null +++ b/lamp/data/lamp-072.json @@ -0,0 +1,118 @@ +{ + "id": "lamp-072", + "difficulty": 4, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 40, + "y": 40 + }, + "target": { + "x": 312.05, + "y": 76.59 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 120, + "y": 120, + "width": 120, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": 80, + "width": 80, + "height": 40 + }, + { + "x": 80, + "y": 80, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 4, + "segments": [ + { + "length": 90 + }, + { + "length": 110 + }, + { + "length": 90 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -70 + }, + { + "joint": 2, + "angle": 60 + }, + { + "joint": 3, + "angle": 30 + }, + { + "joint": 4, + "angle": -10 + } + ] + }, + "legacy_answer": [ + -70, + 60, + 30, + -10 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-072\n- segment_count: 4\n- arm_base: (40.0, 40.0)\n- target: (312.05, 76.59)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=110\n- joint 3: length=90\n- joint 4: length=110\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=120, y=120, width=120, height=40\n- wall_2: type=l_corner, pattern=warning_stripes\n part 1: x=80, y=80, width=80, height=40\n part 2: x=80, y=80, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-073.json b/lamp/data/lamp-073.json new file mode 100644 index 0000000000000000000000000000000000000000..0084237348cb5883839ee63ca164c0a525d84786 --- /dev/null +++ b/lamp/data/lamp-073.json @@ -0,0 +1,100 @@ +{ + "id": "lamp-073", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 0, + "y": 40 + }, + "target": { + "x": 80.67, + "y": 54.22 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 80, + "width": 80, + "height": 40 + }, + { + "x": 0, + "y": 80, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": -40, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 50 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 45 + }, + { + "joint": 2, + "angle": -25 + } + ] + }, + "legacy_answer": [ + 45, + -25 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-073\n- segment_count: 2\n- arm_base: (0.0, 40.0)\n- target: (80.67, 54.22)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=50\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=0, y=80, width=80, height=40\n part 2: x=0, y=80, width=40, height=120\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=0, y=-40, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-074.json b/lamp/data/lamp-074.json new file mode 100644 index 0000000000000000000000000000000000000000..242892fdd63776a6dba3d2986727f49bf30754b6 --- /dev/null +++ b/lamp/data/lamp-074.json @@ -0,0 +1,118 @@ +{ + "id": "lamp-074", + "difficulty": 4, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 40, + "y": 80 + }, + "target": { + "x": 193.75, + "y": 196.25 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 160, + "width": 80, + "height": 40 + }, + { + "x": 80, + "y": 200, + "width": 80, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 0, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 4, + "segments": [ + { + "length": 90 + }, + { + "length": 90 + }, + { + "length": 110 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 45 + }, + { + "joint": 2, + "angle": 40 + }, + { + "joint": 3, + "angle": -35 + }, + { + "joint": 4, + "angle": 140 + } + ] + }, + "legacy_answer": [ + 45, + 40, + -35, + 140 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-074\n- segment_count: 4\n- arm_base: (40.0, 80.0)\n- target: (193.75, 196.25)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=90\n- joint 3: length=110\n- joint 4: length=90\n- obstacles:\n- wall_1: type=stair, pattern=warning_stripes\n part 1: x=40, y=160, width=80, height=40\n part 2: x=80, y=200, width=80, height=40\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=40, y=0, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-075.json b/lamp/data/lamp-075.json new file mode 100644 index 0000000000000000000000000000000000000000..96432433cf383d58934ed0168386342de6c862ba --- /dev/null +++ b/lamp/data/lamp-075.json @@ -0,0 +1,109 @@ +{ + "id": "lamp-075", + "difficulty": 3, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 120, + "y": 40 + }, + "target": { + "x": -33.22, + "y": 20.28 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 80, + "width": 120, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": -80, + "y": 80, + "width": 80, + "height": 40 + }, + { + "x": -40, + "y": 120, + "width": 80, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 3, + "segments": [ + { + "length": 90 + }, + { + "length": 110 + }, + { + "length": 70 + } + ], + "initialAngles": [ + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 180 + }, + { + "joint": 2, + "angle": 160 + }, + { + "joint": 3, + "angle": -55 + } + ] + }, + "legacy_answer": [ + 180, + 160, + -55 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-075\n- segment_count: 3\n- arm_base: (120.0, 40.0)\n- target: (-33.22, 20.28)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=110\n- joint 3: length=70\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=0, y=80, width=120, height=40\n- wall_2: type=stair, pattern=warning_stripes\n part 1: x=-80, y=80, width=80, height=40\n part 2: x=-40, y=120, width=80, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-076.json b/lamp/data/lamp-076.json new file mode 100644 index 0000000000000000000000000000000000000000..b00145d554fefeb990e8dbee8f8ea056cc9c4c2e --- /dev/null +++ b/lamp/data/lamp-076.json @@ -0,0 +1,133 @@ +{ + "id": "lamp-076", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 0, + "y": -80 + }, + "target": { + "x": 99.3, + "y": -68.04 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": -40, + "width": 80, + "height": 40 + }, + { + "x": 40, + "y": -40, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 120, + "y": -40, + "width": 80, + "height": 40 + }, + { + "x": 160, + "y": 0, + "width": 80, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 50 + }, + { + "length": 50 + }, + { + "length": 50 + }, + { + "length": 50 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 125 + }, + { + "joint": 2, + "angle": 75 + }, + { + "joint": 3, + "angle": -10 + }, + { + "joint": 4, + "angle": -115 + }, + { + "joint": 5, + "angle": -15 + } + ] + }, + "legacy_answer": [ + 125, + 75, + -10, + -115, + -15 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-076\n- segment_count: 5\n- arm_base: (0.0, -80.0)\n- target: (99.3, -68.04)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=50\n- joint 3: length=50\n- joint 4: length=50\n- joint 5: length=90\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=40, y=-40, width=80, height=40\n part 2: x=40, y=-40, width=40, height=120\n- wall_2: type=stair, pattern=warning_stripes\n part 1: x=120, y=-40, width=80, height=40\n part 2: x=160, y=0, width=80, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-077.json b/lamp/data/lamp-077.json new file mode 100644 index 0000000000000000000000000000000000000000..c47141ce23313242075e2c505c3e179ab76c5987 --- /dev/null +++ b/lamp/data/lamp-077.json @@ -0,0 +1,94 @@ +{ + "id": "lamp-077", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 120, + "y": 120 + }, + "target": { + "x": 37.38, + "y": -36.99 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_vertical", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 0, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": 0, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 70 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -130 + }, + { + "joint": 2, + "angle": -110 + } + ] + }, + "legacy_answer": [ + -130, + -110 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-077\n- segment_count: 2\n- arm_base: (120.0, 120.0)\n- target: (37.38, -36.99)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=70\n- joint 2: length=110\n- obstacles:\n- wall_1: type=bar_vertical, pattern=warning_stripes\n part 1: x=0, y=0, width=40, height=120\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=80, y=0, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-078.json b/lamp/data/lamp-078.json new file mode 100644 index 0000000000000000000000000000000000000000..23090f874576853ff211231743cd20aa35e1213b --- /dev/null +++ b/lamp/data/lamp-078.json @@ -0,0 +1,118 @@ +{ + "id": "lamp-078", + "difficulty": 4, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 40, + "y": -40 + }, + "target": { + "x": -38.29, + "y": -9.94 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 0, + "width": 120, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 40, + "width": 80, + "height": 40 + }, + { + "x": 40, + "y": 80, + "width": 80, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 4, + "segments": [ + { + "length": 90 + }, + { + "length": 110 + }, + { + "length": 110 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 15 + }, + { + "joint": 2, + "angle": -115 + }, + { + "joint": 3, + "angle": 135 + }, + { + "joint": 4, + "angle": 145 + } + ] + }, + "legacy_answer": [ + 15, + -115, + 135, + 145 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-078\n- segment_count: 4\n- arm_base: (40.0, -40.0)\n- target: (-38.29, -9.94)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=110\n- joint 3: length=110\n- joint 4: length=50\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=0, y=0, width=120, height=40\n- wall_2: type=stair, pattern=warning_stripes\n part 1: x=0, y=40, width=80, height=40\n part 2: x=40, y=80, width=80, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-079.json b/lamp/data/lamp-079.json new file mode 100644 index 0000000000000000000000000000000000000000..4d93cabccee750a73c7c37ea7985f8f3b05c741a --- /dev/null +++ b/lamp/data/lamp-079.json @@ -0,0 +1,100 @@ +{ + "id": "lamp-079", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": -40, + "y": 120 + }, + "target": { + "x": -77.9, + "y": 168.28 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": -40, + "y": 200, + "width": 80, + "height": 40 + }, + { + "x": -40, + "y": 200, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": -40, + "y": 160, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 50 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -70 + }, + { + "joint": 2, + "angle": 120 + } + ] + }, + "legacy_answer": [ + -70, + 120 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-079\n- segment_count: 2\n- arm_base: (-40.0, 120.0)\n- target: (-77.9, 168.28)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=110\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=-40, y=200, width=80, height=40\n part 2: x=-40, y=200, width=40, height=120\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=-40, y=160, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-080.json b/lamp/data/lamp-080.json new file mode 100644 index 0000000000000000000000000000000000000000..cd250aed464590fe7bcfe9b4e9f5b2a0daf3c2c6 --- /dev/null +++ b/lamp/data/lamp-080.json @@ -0,0 +1,99 @@ +{ + "id": "lamp-080", + "difficulty": 4, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 80, + "y": 120 + }, + "target": { + "x": 240.07, + "y": 25.5 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 200, + "y": 40, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 4, + "segments": [ + { + "length": 70 + }, + { + "length": 90 + }, + { + "length": 90 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 75 + }, + { + "joint": 2, + "angle": -40 + }, + { + "joint": 3, + "angle": -100 + }, + { + "joint": 4, + "angle": -10 + } + ] + }, + "legacy_answer": [ + 75, + -40, + -100, + -10 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-080\n- segment_count: 4\n- arm_base: (80.0, 120.0)\n- target: (240.07, 25.5)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=70\n- joint 2: length=90\n- joint 3: length=90\n- joint 4: length=90\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=200, y=40, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-081.json b/lamp/data/lamp-081.json new file mode 100644 index 0000000000000000000000000000000000000000..805f63136bcb50a05bbb761722ea604247f77423 --- /dev/null +++ b/lamp/data/lamp-081.json @@ -0,0 +1,118 @@ +{ + "id": "lamp-081", + "difficulty": 4, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 0, + "y": 120 + }, + "target": { + "x": 34.75, + "y": 179.32 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": 160, + "width": 80, + "height": 40 + }, + { + "x": 80, + "y": 160, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "block", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 0, + "width": 80, + "height": 80 + } + ] + } + ], + "arm": { + "segmentCount": 4, + "segments": [ + { + "length": 50 + }, + { + "length": 90 + }, + { + "length": 50 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 145 + }, + { + "joint": 2, + "angle": 50 + }, + { + "joint": 3, + "angle": 0 + }, + { + "joint": 4, + "angle": -130 + } + ] + }, + "legacy_answer": [ + 145, + 50, + 0, + -130 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-081\n- segment_count: 4\n- arm_base: (0.0, 120.0)\n- target: (34.75, 179.32)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=90\n- joint 3: length=50\n- joint 4: length=50\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=80, y=160, width=80, height=40\n part 2: x=80, y=160, width=40, height=120\n- wall_2: type=block, pattern=warning_stripes\n part 1: x=0, y=0, width=80, height=80\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-082.json b/lamp/data/lamp-082.json new file mode 100644 index 0000000000000000000000000000000000000000..8c8f97db0ae6631524007886e325c3625af4c662 --- /dev/null +++ b/lamp/data/lamp-082.json @@ -0,0 +1,118 @@ +{ + "id": "lamp-082", + "difficulty": 4, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 120, + "y": 40 + }, + "target": { + "x": -49.61, + "y": 222.4 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 120, + "width": 80, + "height": 40 + }, + { + "x": 40, + "y": 120, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "bar_vertical", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 120, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 4, + "segments": [ + { + "length": 70 + }, + { + "length": 90 + }, + { + "length": 110 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 110 + }, + { + "joint": 2, + "angle": -165 + }, + { + "joint": 3, + "angle": 125 + }, + { + "joint": 4, + "angle": 85 + } + ] + }, + "legacy_answer": [ + 110, + -165, + 125, + 85 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-082\n- segment_count: 4\n- arm_base: (120.0, 40.0)\n- target: (-49.61, 222.4)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=70\n- joint 2: length=90\n- joint 3: length=110\n- joint 4: length=50\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=40, y=120, width=80, height=40\n part 2: x=40, y=120, width=40, height=120\n- wall_2: type=bar_vertical, pattern=warning_stripes\n part 1: x=0, y=120, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-083.json b/lamp/data/lamp-083.json new file mode 100644 index 0000000000000000000000000000000000000000..f3b038a04eed21f55b1a9afb4e301de7baad38be --- /dev/null +++ b/lamp/data/lamp-083.json @@ -0,0 +1,115 @@ +{ + "id": "lamp-083", + "difficulty": 3, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 120, + "y": 0 + }, + "target": { + "x": 105.69, + "y": 130.31 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 120, + "y": 40, + "width": 80, + "height": 40 + }, + { + "x": 160, + "y": 80, + "width": 80, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 0, + "width": 80, + "height": 40 + }, + { + "x": 0, + "y": 0, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 3, + "segments": [ + { + "length": 110 + }, + { + "length": 50 + }, + { + "length": 70 + } + ], + "initialAngles": [ + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 100 + }, + { + "joint": 2, + "angle": -135 + }, + { + "joint": 3, + "angle": 55 + } + ] + }, + "legacy_answer": [ + 100, + -135, + 55 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-083\n- segment_count: 3\n- arm_base: (120.0, 0.0)\n- target: (105.69, 130.31)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=110\n- joint 2: length=50\n- joint 3: length=70\n- obstacles:\n- wall_1: type=stair, pattern=warning_stripes\n part 1: x=120, y=40, width=80, height=40\n part 2: x=160, y=80, width=80, height=40\n- wall_2: type=l_corner, pattern=warning_stripes\n part 1: x=0, y=0, width=80, height=40\n part 2: x=0, y=0, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-084.json b/lamp/data/lamp-084.json new file mode 100644 index 0000000000000000000000000000000000000000..621d6606c8a537f619d252a1a74913f5cdc9f300 --- /dev/null +++ b/lamp/data/lamp-084.json @@ -0,0 +1,100 @@ +{ + "id": "lamp-084", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 80, + "y": 0 + }, + "target": { + "x": 148.18, + "y": -38.24 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": 40, + "width": 120, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 40, + "width": 80, + "height": 40 + }, + { + "x": 0, + "y": 40, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 70 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -125 + }, + { + "joint": 2, + "angle": 10 + } + ] + }, + "legacy_answer": [ + -125, + 10 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-084\n- segment_count: 2\n- arm_base: (80.0, 0.0)\n- target: (148.18, -38.24)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=70\n- joint 2: length=110\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=80, y=40, width=120, height=40\n- wall_2: type=l_corner, pattern=warning_stripes\n part 1: x=0, y=40, width=80, height=40\n part 2: x=0, y=40, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-085.json b/lamp/data/lamp-085.json new file mode 100644 index 0000000000000000000000000000000000000000..d99a3628cdb30e03365a904dd5e3d3446278857a --- /dev/null +++ b/lamp/data/lamp-085.json @@ -0,0 +1,118 @@ +{ + "id": "lamp-085", + "difficulty": 4, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": -40, + "y": 0 + }, + "target": { + "x": 48.94, + "y": 259.52 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": -40, + "y": 120, + "width": 80, + "height": 40 + }, + { + "x": 0, + "y": 160, + "width": 80, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": -40, + "y": 80, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 4, + "segments": [ + { + "length": 50 + }, + { + "length": 90 + }, + { + "length": 110 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 60 + }, + { + "joint": 2, + "angle": 140 + }, + { + "joint": 3, + "angle": 70 + }, + { + "joint": 4, + "angle": 30 + } + ] + }, + "legacy_answer": [ + 60, + 140, + 70, + 30 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-085\n- segment_count: 4\n- arm_base: (-40.0, 0.0)\n- target: (48.94, 259.52)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=90\n- joint 3: length=110\n- joint 4: length=110\n- obstacles:\n- wall_1: type=stair, pattern=warning_stripes\n part 1: x=-40, y=120, width=80, height=40\n part 2: x=0, y=160, width=80, height=40\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=-40, y=80, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-086.json b/lamp/data/lamp-086.json new file mode 100644 index 0000000000000000000000000000000000000000..c96dbaae8e7b04f72f26345a8c64d24eabe99546 --- /dev/null +++ b/lamp/data/lamp-086.json @@ -0,0 +1,100 @@ +{ + "id": "lamp-086", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 120, + "y": -40 + }, + "target": { + "x": 239.2, + "y": -50.78 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 120, + "y": 0, + "width": 120, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 0, + "width": 80, + "height": 40 + }, + { + "x": 80, + "y": 40, + "width": 80, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 70 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -70 + }, + { + "joint": 2, + "angle": 30 + } + ] + }, + "legacy_answer": [ + -70, + 30 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-086\n- segment_count: 2\n- arm_base: (120.0, -40.0)\n- target: (239.2, -50.78)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=70\n- joint 2: length=110\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=120, y=0, width=120, height=40\n- wall_2: type=stair, pattern=warning_stripes\n part 1: x=40, y=0, width=80, height=40\n part 2: x=80, y=40, width=80, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-087.json b/lamp/data/lamp-087.json new file mode 100644 index 0000000000000000000000000000000000000000..940b5868541f87aaf57cf11572dc86b1a41bf519 --- /dev/null +++ b/lamp/data/lamp-087.json @@ -0,0 +1,127 @@ +{ + "id": "lamp-087", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": -40, + "y": 40 + }, + "target": { + "x": 27.64, + "y": 283.72 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": -80, + "y": 120, + "width": 80, + "height": 40 + }, + { + "x": -80, + "y": 120, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 200, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 110 + }, + { + "length": 110 + }, + { + "length": 70 + }, + { + "length": 90 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 35 + }, + { + "joint": 2, + "angle": 120 + }, + { + "joint": 3, + "angle": 95 + }, + { + "joint": 4, + "angle": 10 + }, + { + "joint": 5, + "angle": -180 + } + ] + }, + "legacy_answer": [ + 35, + 120, + 95, + 10, + -180 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-087\n- segment_count: 5\n- arm_base: (-40.0, 40.0)\n- target: (27.64, 283.72)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=110\n- joint 2: length=110\n- joint 3: length=70\n- joint 4: length=90\n- joint 5: length=50\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=-80, y=120, width=80, height=40\n part 2: x=-80, y=120, width=40, height=120\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=0, y=200, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-088.json b/lamp/data/lamp-088.json new file mode 100644 index 0000000000000000000000000000000000000000..e9e62516d6318baecb5f8577f4977183c9ebda78 --- /dev/null +++ b/lamp/data/lamp-088.json @@ -0,0 +1,109 @@ +{ + "id": "lamp-088", + "difficulty": 3, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 0, + "y": 120 + }, + "target": { + "x": -13.53, + "y": -21.6 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "block", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 0, + "width": 80, + "height": 80 + } + ] + }, + { + "id": "wall_2", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": -40, + "y": 160, + "width": 80, + "height": 40 + }, + { + "x": 0, + "y": 200, + "width": 80, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 3, + "segments": [ + { + "length": 50 + }, + { + "length": 50 + }, + { + "length": 70 + } + ], + "initialAngles": [ + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -125 + }, + { + "joint": 2, + "angle": -120 + }, + { + "joint": 3, + "angle": -55 + } + ] + }, + "legacy_answer": [ + -125, + -120, + -55 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-088\n- segment_count: 3\n- arm_base: (0.0, 120.0)\n- target: (-13.53, -21.6)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=50\n- joint 3: length=70\n- obstacles:\n- wall_1: type=block, pattern=warning_stripes\n part 1: x=40, y=0, width=80, height=80\n- wall_2: type=stair, pattern=warning_stripes\n part 1: x=-40, y=160, width=80, height=40\n part 2: x=0, y=200, width=80, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-089.json b/lamp/data/lamp-089.json new file mode 100644 index 0000000000000000000000000000000000000000..0cc98ea73fb2b6ee726b90ced8ee62b9bf6e3112 --- /dev/null +++ b/lamp/data/lamp-089.json @@ -0,0 +1,127 @@ +{ + "id": "lamp-089", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 80, + "y": 40 + }, + "target": { + "x": 151.29, + "y": 66.98 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 80, + "width": 120, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": 120, + "width": 80, + "height": 40 + }, + { + "x": 80, + "y": 120, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 110 + }, + { + "length": 50 + }, + { + "length": 70 + }, + { + "length": 110 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -20 + }, + { + "joint": 2, + "angle": 55 + }, + { + "joint": 3, + "angle": 15 + }, + { + "joint": 4, + "angle": 155 + }, + { + "joint": 5, + "angle": -125 + } + ] + }, + "legacy_answer": [ + -20, + 55, + 15, + 155, + -125 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-089\n- segment_count: 5\n- arm_base: (80.0, 40.0)\n- target: (151.29, 66.98)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=110\n- joint 2: length=50\n- joint 3: length=70\n- joint 4: length=110\n- joint 5: length=50\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=40, y=80, width=120, height=40\n- wall_2: type=l_corner, pattern=warning_stripes\n part 1: x=80, y=120, width=80, height=40\n part 2: x=80, y=120, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-090.json b/lamp/data/lamp-090.json new file mode 100644 index 0000000000000000000000000000000000000000..31cd3b113db269a696500333146de8a5f7559e38 --- /dev/null +++ b/lamp/data/lamp-090.json @@ -0,0 +1,103 @@ +{ + "id": "lamp-090", + "difficulty": 3, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": -40, + "y": 120 + }, + "target": { + "x": 49.22, + "y": 78.64 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": -80, + "y": 160, + "width": 120, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "block", + "pattern": "warning_stripes", + "parts": [ + { + "x": -40, + "y": -40, + "width": 80, + "height": 80 + } + ] + } + ], + "arm": { + "segmentCount": 3, + "segments": [ + { + "length": 90 + }, + { + "length": 50 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -95 + }, + { + "joint": 2, + "angle": 105 + }, + { + "joint": 3, + "angle": 0 + } + ] + }, + "legacy_answer": [ + -95, + 105, + 0 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-090\n- segment_count: 3\n- arm_base: (-40.0, 120.0)\n- target: (49.22, 78.64)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=50\n- joint 3: length=110\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=-80, y=160, width=120, height=40\n- wall_2: type=block, pattern=warning_stripes\n part 1: x=-40, y=-40, width=80, height=80\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-091.json b/lamp/data/lamp-091.json new file mode 100644 index 0000000000000000000000000000000000000000..e6a6b876d804e09db9f8915a8be834f43cd2f705 --- /dev/null +++ b/lamp/data/lamp-091.json @@ -0,0 +1,100 @@ +{ + "id": "lamp-091", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 40, + "y": 120 + }, + "target": { + "x": 40, + "y": 30 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 160, + "width": 120, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": 0, + "width": 80, + "height": 40 + }, + { + "x": 120, + "y": 40, + "width": 80, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 90 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -30 + }, + { + "joint": 2, + "angle": -150 + } + ] + }, + "legacy_answer": [ + -30, + -150 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-091\n- segment_count: 2\n- arm_base: (40.0, 120.0)\n- target: (40.0, 30.0)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=90\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=0, y=160, width=120, height=40\n- wall_2: type=stair, pattern=warning_stripes\n part 1: x=80, y=0, width=80, height=40\n part 2: x=120, y=40, width=80, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-092.json b/lamp/data/lamp-092.json new file mode 100644 index 0000000000000000000000000000000000000000..3674aaf755a5d10d3b1bef6da2a9bc3b45809c5e --- /dev/null +++ b/lamp/data/lamp-092.json @@ -0,0 +1,118 @@ +{ + "id": "lamp-092", + "difficulty": 4, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": -40, + "y": 0 + }, + "target": { + "x": 11.62, + "y": 73.72 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": -40, + "y": 120, + "width": 80, + "height": 40 + }, + { + "x": 0, + "y": 160, + "width": 80, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "block", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 80, + "width": 80, + "height": 80 + } + ] + } + ], + "arm": { + "segmentCount": 4, + "segments": [ + { + "length": 110 + }, + { + "length": 90 + }, + { + "length": 110 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 10 + }, + { + "joint": 2, + "angle": 115 + }, + { + "joint": 3, + "angle": -170 + }, + { + "joint": 4, + "angle": -5 + } + ] + }, + "legacy_answer": [ + 10, + 115, + -170, + -5 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-092\n- segment_count: 4\n- arm_base: (-40.0, 0.0)\n- target: (11.62, 73.72)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=110\n- joint 2: length=90\n- joint 3: length=110\n- joint 4: length=90\n- obstacles:\n- wall_1: type=stair, pattern=warning_stripes\n part 1: x=-40, y=120, width=80, height=40\n part 2: x=0, y=160, width=80, height=40\n- wall_2: type=block, pattern=warning_stripes\n part 1: x=40, y=80, width=80, height=80\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-093.json b/lamp/data/lamp-093.json new file mode 100644 index 0000000000000000000000000000000000000000..aa26f7b0f8bda3e418fbef5c4ff1a1bc94a665ed --- /dev/null +++ b/lamp/data/lamp-093.json @@ -0,0 +1,100 @@ +{ + "id": "lamp-093", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 120, + "y": 80 + }, + "target": { + "x": 210.31, + "y": 47.51 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 120, + "y": 120, + "width": 80, + "height": 40 + }, + { + "x": 120, + "y": 120, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 120, + "y": 0, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 50 + }, + { + "length": 70 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 25 + }, + { + "joint": 2, + "angle": -50 + } + ] + }, + "legacy_answer": [ + 25, + -50 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-093\n- segment_count: 2\n- arm_base: (120.0, 80.0)\n- target: (210.31, 47.51)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=70\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=120, y=120, width=80, height=40\n part 2: x=120, y=120, width=40, height=120\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=120, y=0, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-094.json b/lamp/data/lamp-094.json new file mode 100644 index 0000000000000000000000000000000000000000..4dedef72a3e23c4ef8ceb5b9ce35046f28c02bad --- /dev/null +++ b/lamp/data/lamp-094.json @@ -0,0 +1,121 @@ +{ + "id": "lamp-094", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 40, + "y": 120 + }, + "target": { + "x": -60.27, + "y": 355.81 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": -80, + "y": 240, + "width": 120, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "block", + "pattern": "warning_stripes", + "parts": [ + { + "x": -80, + "y": 160, + "width": 80, + "height": 80 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 50 + }, + { + "length": 90 + }, + { + "length": 110 + }, + { + "length": 90 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 150 + }, + { + "joint": 2, + "angle": 170 + }, + { + "joint": 3, + "angle": 120 + }, + { + "joint": 4, + "angle": 35 + }, + { + "joint": 5, + "angle": 75 + } + ] + }, + "legacy_answer": [ + 150, + 170, + 120, + 35, + 75 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-094\n- segment_count: 5\n- arm_base: (40.0, 120.0)\n- target: (-60.27, 355.81)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=90\n- joint 3: length=110\n- joint 4: length=90\n- joint 5: length=50\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=-80, y=240, width=120, height=40\n- wall_2: type=block, pattern=warning_stripes\n part 1: x=-80, y=160, width=80, height=80\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-095.json b/lamp/data/lamp-095.json new file mode 100644 index 0000000000000000000000000000000000000000..e126b4573ea1ad831355cd5ff2f060d5d3020371 --- /dev/null +++ b/lamp/data/lamp-095.json @@ -0,0 +1,81 @@ +{ + "id": "lamp-095", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 0, + "y": 80 + }, + "target": { + "x": 31.04, + "y": -18.44 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 0, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 70 + }, + { + "length": 70 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -115 + }, + { + "joint": 2, + "angle": -30 + } + ] + }, + "legacy_answer": [ + -115, + -30 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-095\n- segment_count: 2\n- arm_base: (0.0, 80.0)\n- target: (31.04, -18.44)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=70\n- joint 2: length=70\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=0, y=0, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-096.json b/lamp/data/lamp-096.json new file mode 100644 index 0000000000000000000000000000000000000000..e2c27f164ff9060ab49263995a3b4f04a5ebb441 --- /dev/null +++ b/lamp/data/lamp-096.json @@ -0,0 +1,127 @@ +{ + "id": "lamp-096", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": -40, + "y": 40 + }, + "target": { + "x": -55.48, + "y": 353.39 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_vertical", + "pattern": "warning_stripes", + "parts": [ + { + "x": -40, + "y": 120, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 280, + "width": 80, + "height": 40 + }, + { + "x": 40, + "y": 320, + "width": 80, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 50 + }, + { + "length": 90 + }, + { + "length": 110 + }, + { + "length": 50 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 80 + }, + { + "joint": 2, + "angle": 35 + }, + { + "joint": 3, + "angle": 95 + }, + { + "joint": 4, + "angle": 150 + }, + { + "joint": 5, + "angle": 120 + } + ] + }, + "legacy_answer": [ + 80, + 35, + 95, + 150, + 120 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-096\n- segment_count: 5\n- arm_base: (-40.0, 40.0)\n- target: (-55.48, 353.39)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=90\n- joint 3: length=110\n- joint 4: length=50\n- joint 5: length=90\n- obstacles:\n- wall_1: type=bar_vertical, pattern=warning_stripes\n part 1: x=-40, y=120, width=40, height=120\n- wall_2: type=stair, pattern=warning_stripes\n part 1: x=0, y=280, width=80, height=40\n part 2: x=40, y=320, width=80, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-097.json b/lamp/data/lamp-097.json new file mode 100644 index 0000000000000000000000000000000000000000..e5012ac872b98b795a71395c94e417dbb00ef95c --- /dev/null +++ b/lamp/data/lamp-097.json @@ -0,0 +1,127 @@ +{ + "id": "lamp-097", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 40, + "y": -40 + }, + "target": { + "x": 140.94, + "y": -3.01 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 0, + "width": 120, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 40, + "width": 80, + "height": 40 + }, + { + "x": 80, + "y": 80, + "width": 80, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 70 + }, + { + "length": 50 + }, + { + "length": 50 + }, + { + "length": 90 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -165 + }, + { + "joint": 2, + "angle": -55 + }, + { + "joint": 3, + "angle": 40 + }, + { + "joint": 4, + "angle": 10 + }, + { + "joint": 5, + "angle": 75 + } + ] + }, + "legacy_answer": [ + -165, + -55, + 40, + 10, + 75 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-097\n- segment_count: 5\n- arm_base: (40.0, -40.0)\n- target: (140.94, -3.01)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=70\n- joint 2: length=50\n- joint 3: length=50\n- joint 4: length=90\n- joint 5: length=50\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=40, y=0, width=120, height=40\n- wall_2: type=stair, pattern=warning_stripes\n part 1: x=40, y=40, width=80, height=40\n part 2: x=80, y=80, width=80, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-098.json b/lamp/data/lamp-098.json new file mode 100644 index 0000000000000000000000000000000000000000..21025ebc7139262c3eae4d3da07f386d62a0c3db --- /dev/null +++ b/lamp/data/lamp-098.json @@ -0,0 +1,90 @@ +{ + "id": "lamp-098", + "difficulty": 3, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 40, + "y": 120 + }, + "target": { + "x": -15.39, + "y": 190.37 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "block", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 160, + "width": 80, + "height": 80 + } + ] + } + ], + "arm": { + "segmentCount": 3, + "segments": [ + { + "length": 70 + }, + { + "length": 50 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -135 + }, + { + "joint": 2, + "angle": 50 + }, + { + "joint": 3, + "angle": 115 + } + ] + }, + "legacy_answer": [ + -135, + 50, + 115 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-098\n- segment_count: 3\n- arm_base: (40.0, 120.0)\n- target: (-15.39, 190.37)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=70\n- joint 2: length=50\n- joint 3: length=90\n- obstacles:\n- wall_1: type=block, pattern=warning_stripes\n part 1: x=0, y=160, width=80, height=80\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-099.json b/lamp/data/lamp-099.json new file mode 100644 index 0000000000000000000000000000000000000000..c7bb8b8a82ef92e2a81673949357057fb7204ab1 --- /dev/null +++ b/lamp/data/lamp-099.json @@ -0,0 +1,127 @@ +{ + "id": "lamp-099", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 80, + "y": 40 + }, + "target": { + "x": 21.17, + "y": 103.6 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": 80, + "width": 80, + "height": 40 + }, + { + "x": 80, + "y": 80, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "bar_vertical", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": -40, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 70 + }, + { + "length": 90 + }, + { + "length": 90 + }, + { + "length": 50 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -40 + }, + { + "joint": 2, + "angle": 125 + }, + { + "joint": 3, + "angle": 130 + }, + { + "joint": 4, + "angle": -25 + }, + { + "joint": 5, + "angle": -165 + } + ] + }, + "legacy_answer": [ + -40, + 125, + 130, + -25, + -165 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-099\n- segment_count: 5\n- arm_base: (80.0, 40.0)\n- target: (21.17, 103.6)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=70\n- joint 2: length=90\n- joint 3: length=90\n- joint 4: length=50\n- joint 5: length=50\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=80, y=80, width=80, height=40\n part 2: x=80, y=80, width=40, height=120\n- wall_2: type=bar_vertical, pattern=warning_stripes\n part 1: x=0, y=-40, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-100.json b/lamp/data/lamp-100.json new file mode 100644 index 0000000000000000000000000000000000000000..6f552365a4575cfb1ff5385f37fa75ca59a6348a --- /dev/null +++ b/lamp/data/lamp-100.json @@ -0,0 +1,81 @@ +{ + "id": "lamp-100", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": -80, + "y": 120 + }, + "target": { + "x": -21.07, + "y": 187.36 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_vertical", + "pattern": "warning_stripes", + "parts": [ + { + "x": -80, + "y": 160, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 70 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 15 + }, + { + "joint": 2, + "angle": 100 + } + ] + }, + "legacy_answer": [ + 15, + 100 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-100\n- segment_count: 2\n- arm_base: (-80.0, 120.0)\n- target: (-21.07, 187.36)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=70\n- joint 2: length=50\n- obstacles:\n- wall_1: type=bar_vertical, pattern=warning_stripes\n part 1: x=-80, y=160, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-101.json b/lamp/data/lamp-101.json new file mode 100644 index 0000000000000000000000000000000000000000..a2579e4a9dde94630bb155093fa50a49e9abd6ee --- /dev/null +++ b/lamp/data/lamp-101.json @@ -0,0 +1,109 @@ +{ + "id": "lamp-101", + "difficulty": 3, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 40, + "y": 0 + }, + "target": { + "x": -40.42, + "y": -41.47 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 40, + "width": 80, + "height": 40 + }, + { + "x": 0, + "y": 40, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "bar_vertical", + "pattern": "warning_stripes", + "parts": [ + { + "x": -40, + "y": 0, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 3, + "segments": [ + { + "length": 90 + }, + { + "length": 90 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -140 + }, + { + "joint": 2, + "angle": -55 + }, + { + "joint": 3, + "angle": 125 + } + ] + }, + "legacy_answer": [ + -140, + -55, + 125 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-101\n- segment_count: 3\n- arm_base: (40.0, 0.0)\n- target: (-40.42, -41.47)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=90\n- joint 3: length=110\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=0, y=40, width=80, height=40\n part 2: x=0, y=40, width=40, height=120\n- wall_2: type=bar_vertical, pattern=warning_stripes\n part 1: x=-40, y=0, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-102.json b/lamp/data/lamp-102.json new file mode 100644 index 0000000000000000000000000000000000000000..f5aa1e4261056e41da14a6a37b3f2c73d6c218a3 --- /dev/null +++ b/lamp/data/lamp-102.json @@ -0,0 +1,109 @@ +{ + "id": "lamp-102", + "difficulty": 3, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 40, + "y": 40 + }, + "target": { + "x": 76.65, + "y": 236.38 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 80, + "width": 120, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 120, + "width": 80, + "height": 40 + }, + { + "x": 80, + "y": 160, + "width": 80, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 3, + "segments": [ + { + "length": 90 + }, + { + "length": 90 + }, + { + "length": 70 + } + ], + "initialAngles": [ + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 130 + }, + { + "joint": 2, + "angle": 60 + }, + { + "joint": 3, + "angle": 45 + } + ] + }, + "legacy_answer": [ + 130, + 60, + 45 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-102\n- segment_count: 3\n- arm_base: (40.0, 40.0)\n- target: (76.65, 236.38)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=90\n- joint 3: length=70\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=40, y=80, width=120, height=40\n- wall_2: type=stair, pattern=warning_stripes\n part 1: x=40, y=120, width=80, height=40\n part 2: x=80, y=160, width=80, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-103.json b/lamp/data/lamp-103.json new file mode 100644 index 0000000000000000000000000000000000000000..9fe8470923d1470d96e0720d37f6a67f7153d7d3 --- /dev/null +++ b/lamp/data/lamp-103.json @@ -0,0 +1,94 @@ +{ + "id": "lamp-103", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 120, + "y": 120 + }, + "target": { + "x": 39.72, + "y": 84.93 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": 40, + "width": 120, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "block", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 0, + "width": 80, + "height": 80 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 70 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 135 + }, + { + "joint": 2, + "angle": -110 + } + ] + }, + "legacy_answer": [ + 135, + -110 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-103\n- segment_count: 2\n- arm_base: (120.0, 120.0)\n- target: (39.72, 84.93)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=70\n- joint 2: length=90\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=80, y=40, width=120, height=40\n- wall_2: type=block, pattern=warning_stripes\n part 1: x=0, y=0, width=80, height=80\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-104.json b/lamp/data/lamp-104.json new file mode 100644 index 0000000000000000000000000000000000000000..a20fca197b17e2e9b45b8ffc466c71b954e7e9a7 --- /dev/null +++ b/lamp/data/lamp-104.json @@ -0,0 +1,109 @@ +{ + "id": "lamp-104", + "difficulty": 3, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 40, + "y": 0 + }, + "target": { + "x": 189.93, + "y": 19.19 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": 40, + "width": 80, + "height": 40 + }, + { + "x": 80, + "y": 40, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "block", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 40, + "width": 80, + "height": 80 + } + ] + } + ], + "arm": { + "segmentCount": 3, + "segments": [ + { + "length": 90 + }, + { + "length": 90 + }, + { + "length": 70 + } + ], + "initialAngles": [ + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -15 + }, + { + "joint": 2, + "angle": -15 + }, + { + "joint": 3, + "angle": 110 + } + ] + }, + "legacy_answer": [ + -15, + -15, + 110 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-104\n- segment_count: 3\n- arm_base: (40.0, 0.0)\n- target: (189.93, 19.19)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=90\n- joint 3: length=70\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=80, y=40, width=80, height=40\n part 2: x=80, y=40, width=40, height=120\n- wall_2: type=block, pattern=warning_stripes\n part 1: x=0, y=40, width=80, height=80\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-105.json b/lamp/data/lamp-105.json new file mode 100644 index 0000000000000000000000000000000000000000..9398e96c0648ec9ee89d6ecdc0f9c138f2cb0cb5 --- /dev/null +++ b/lamp/data/lamp-105.json @@ -0,0 +1,94 @@ +{ + "id": "lamp-105", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 120, + "y": 40 + }, + "target": { + "x": 50.63, + "y": 41.81 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": -40, + "width": 120, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "bar_vertical", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 0, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 90 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 145 + }, + { + "joint": 2, + "angle": -85 + } + ] + }, + "legacy_answer": [ + 145, + -85 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-105\n- segment_count: 2\n- arm_base: (120.0, 40.0)\n- target: (50.63, 41.81)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=50\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=40, y=-40, width=120, height=40\n- wall_2: type=bar_vertical, pattern=warning_stripes\n part 1: x=0, y=0, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-106.json b/lamp/data/lamp-106.json new file mode 100644 index 0000000000000000000000000000000000000000..f71da6fa3e802a2d457e06a74c18898c79c90d50 --- /dev/null +++ b/lamp/data/lamp-106.json @@ -0,0 +1,127 @@ +{ + "id": "lamp-106", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 120, + "y": 40 + }, + "target": { + "x": 76.9, + "y": 164.81 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 80, + "width": 120, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 120, + "width": 80, + "height": 40 + }, + { + "x": 0, + "y": 120, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 50 + }, + { + "length": 70 + }, + { + "length": 70 + }, + { + "length": 110 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 55 + }, + { + "joint": 2, + "angle": -105 + }, + { + "joint": 3, + "angle": 25 + }, + { + "joint": 4, + "angle": 105 + }, + { + "joint": 5, + "angle": 170 + } + ] + }, + "legacy_answer": [ + 55, + -105, + 25, + 105, + 170 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-106\n- segment_count: 5\n- arm_base: (120.0, 40.0)\n- target: (76.9, 164.81)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=70\n- joint 3: length=70\n- joint 4: length=110\n- joint 5: length=90\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=0, y=80, width=120, height=40\n- wall_2: type=l_corner, pattern=warning_stripes\n part 1: x=0, y=120, width=80, height=40\n part 2: x=0, y=120, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-107.json b/lamp/data/lamp-107.json new file mode 100644 index 0000000000000000000000000000000000000000..4b64fb66462e017eefb2c2331012fd38d064bae5 --- /dev/null +++ b/lamp/data/lamp-107.json @@ -0,0 +1,118 @@ +{ + "id": "lamp-107", + "difficulty": 4, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 0, + "y": 0 + }, + "target": { + "x": 184.95, + "y": 83.66 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 80, + "width": 80, + "height": 40 + }, + { + "x": 40, + "y": 80, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "block", + "pattern": "warning_stripes", + "parts": [ + { + "x": -40, + "y": 40, + "width": 80, + "height": 80 + } + ] + } + ], + "arm": { + "segmentCount": 4, + "segments": [ + { + "length": 70 + }, + { + "length": 50 + }, + { + "length": 90 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 25 + }, + { + "joint": 2, + "angle": -180 + }, + { + "joint": 3, + "angle": 15 + }, + { + "joint": 4, + "angle": 20 + } + ] + }, + "legacy_answer": [ + 25, + -180, + 15, + 20 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-107\n- segment_count: 4\n- arm_base: (0.0, 0.0)\n- target: (184.95, 83.66)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=70\n- joint 2: length=50\n- joint 3: length=90\n- joint 4: length=90\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=40, y=80, width=80, height=40\n part 2: x=40, y=80, width=40, height=120\n- wall_2: type=block, pattern=warning_stripes\n part 1: x=-40, y=40, width=80, height=80\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-108.json b/lamp/data/lamp-108.json new file mode 100644 index 0000000000000000000000000000000000000000..8f2f693edd71795a80356302945308fb12136e7d --- /dev/null +++ b/lamp/data/lamp-108.json @@ -0,0 +1,106 @@ +{ + "id": "lamp-108", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 0, + "y": -40 + }, + "target": { + "x": -10.99, + "y": 43.47 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 80, + "width": 80, + "height": 40 + }, + { + "x": 0, + "y": 80, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 40, + "width": 80, + "height": 40 + }, + { + "x": 80, + "y": 80, + "width": 80, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 110 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 30 + }, + { + "joint": 2, + "angle": 165 + } + ] + }, + "legacy_answer": [ + 30, + 165 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-108\n- segment_count: 2\n- arm_base: (0.0, -40.0)\n- target: (-10.99, 43.47)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=110\n- joint 2: length=110\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=0, y=80, width=80, height=40\n part 2: x=0, y=80, width=40, height=120\n- wall_2: type=stair, pattern=warning_stripes\n part 1: x=40, y=40, width=80, height=40\n part 2: x=80, y=80, width=80, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-109.json b/lamp/data/lamp-109.json new file mode 100644 index 0000000000000000000000000000000000000000..5e9de5a1ba1c1f1475816b89c49ef884e8abd84c --- /dev/null +++ b/lamp/data/lamp-109.json @@ -0,0 +1,100 @@ +{ + "id": "lamp-109", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 120, + "y": 40 + }, + "target": { + "x": 205.95, + "y": -42.3 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": -40, + "width": 80, + "height": 40 + }, + { + "x": 40, + "y": -40, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 120, + "y": 80, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 50 + }, + { + "length": 70 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -35 + }, + { + "joint": 2, + "angle": -50 + } + ] + }, + "legacy_answer": [ + -35, + -50 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-109\n- segment_count: 2\n- arm_base: (120.0, 40.0)\n- target: (205.95, -42.3)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=70\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=40, y=-40, width=80, height=40\n part 2: x=40, y=-40, width=40, height=120\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=120, y=80, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-110.json b/lamp/data/lamp-110.json new file mode 100644 index 0000000000000000000000000000000000000000..2624dd963e465a0b1389b97a3a362fc54dec5ee5 --- /dev/null +++ b/lamp/data/lamp-110.json @@ -0,0 +1,127 @@ +{ + "id": "lamp-110", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 0, + "y": 0 + }, + "target": { + "x": -34.31, + "y": 112.34 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 80, + "width": 120, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 120, + "width": 80, + "height": 40 + }, + { + "x": 0, + "y": 120, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 70 + }, + { + "length": 50 + }, + { + "length": 50 + }, + { + "length": 70 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 55 + }, + { + "joint": 2, + "angle": -120 + }, + { + "joint": 3, + "angle": 130 + }, + { + "joint": 4, + "angle": 150 + }, + { + "joint": 5, + "angle": 30 + } + ] + }, + "legacy_answer": [ + 55, + -120, + 130, + 150, + 30 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-110\n- segment_count: 5\n- arm_base: (0.0, 0.0)\n- target: (-34.31, 112.34)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=70\n- joint 2: length=50\n- joint 3: length=50\n- joint 4: length=70\n- joint 5: length=50\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=0, y=80, width=120, height=40\n- wall_2: type=l_corner, pattern=warning_stripes\n part 1: x=0, y=120, width=80, height=40\n part 2: x=0, y=120, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-111.json b/lamp/data/lamp-111.json new file mode 100644 index 0000000000000000000000000000000000000000..f961a49408231d2a01d47dfe99ad1b609aa303a8 --- /dev/null +++ b/lamp/data/lamp-111.json @@ -0,0 +1,118 @@ +{ + "id": "lamp-111", + "difficulty": 4, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 40, + "y": 0 + }, + "target": { + "x": 158.23, + "y": -10.66 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 120, + "y": 40, + "width": 80, + "height": 40 + }, + { + "x": 160, + "y": 80, + "width": 80, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "bar_vertical", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": 40, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 4, + "segments": [ + { + "length": 50 + }, + { + "length": 110 + }, + { + "length": 50 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 70 + }, + { + "joint": 2, + "angle": -50 + }, + { + "joint": 3, + "angle": -150 + }, + { + "joint": 4, + "angle": 35 + } + ] + }, + "legacy_answer": [ + 70, + -50, + -150, + 35 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-111\n- segment_count: 4\n- arm_base: (40.0, 0.0)\n- target: (158.23, -10.66)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=110\n- joint 3: length=50\n- joint 4: length=90\n- obstacles:\n- wall_1: type=stair, pattern=warning_stripes\n part 1: x=120, y=40, width=80, height=40\n part 2: x=160, y=80, width=80, height=40\n- wall_2: type=bar_vertical, pattern=warning_stripes\n part 1: x=80, y=40, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-112.json b/lamp/data/lamp-112.json new file mode 100644 index 0000000000000000000000000000000000000000..744e777c288044873c4da21eadd3f20476b9dcf4 --- /dev/null +++ b/lamp/data/lamp-112.json @@ -0,0 +1,127 @@ +{ + "id": "lamp-112", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 80, + "y": 120 + }, + "target": { + "x": 113.47, + "y": 215.38 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 160, + "width": 80, + "height": 40 + }, + { + "x": 0, + "y": 160, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "bar_vertical", + "pattern": "warning_stripes", + "parts": [ + { + "x": 160, + "y": 160, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 70 + }, + { + "length": 90 + }, + { + "length": 50 + }, + { + "length": 50 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 50 + }, + { + "joint": 2, + "angle": 95 + }, + { + "joint": 3, + "angle": 160 + }, + { + "joint": 4, + "angle": 30 + }, + { + "joint": 5, + "angle": -90 + } + ] + }, + "legacy_answer": [ + 50, + 95, + 160, + 30, + -90 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-112\n- segment_count: 5\n- arm_base: (80.0, 120.0)\n- target: (113.47, 215.38)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=70\n- joint 2: length=90\n- joint 3: length=50\n- joint 4: length=50\n- joint 5: length=90\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=0, y=160, width=80, height=40\n part 2: x=0, y=160, width=40, height=120\n- wall_2: type=bar_vertical, pattern=warning_stripes\n part 1: x=160, y=160, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-113.json b/lamp/data/lamp-113.json new file mode 100644 index 0000000000000000000000000000000000000000..5c03e40e7327674ffdc4c1a35a567a230a1a5304 --- /dev/null +++ b/lamp/data/lamp-113.json @@ -0,0 +1,112 @@ +{ + "id": "lamp-113", + "difficulty": 4, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 0, + "y": -40 + }, + "target": { + "x": 76.26, + "y": 9.03 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "block", + "pattern": "warning_stripes", + "parts": [ + { + "x": 120, + "y": 40, + "width": 80, + "height": 80 + } + ] + }, + { + "id": "wall_2", + "type": "bar_vertical", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 0, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 4, + "segments": [ + { + "length": 50 + }, + { + "length": 70 + }, + { + "length": 70 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 25 + }, + { + "joint": 2, + "angle": 80 + }, + { + "joint": 3, + "angle": -20 + }, + { + "joint": 4, + "angle": -160 + } + ] + }, + "legacy_answer": [ + 25, + 80, + -20, + -160 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-113\n- segment_count: 4\n- arm_base: (0.0, -40.0)\n- target: (76.26, 9.03)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=70\n- joint 3: length=70\n- joint 4: length=50\n- obstacles:\n- wall_1: type=block, pattern=warning_stripes\n part 1: x=120, y=40, width=80, height=80\n- wall_2: type=bar_vertical, pattern=warning_stripes\n part 1: x=0, y=0, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-114.json b/lamp/data/lamp-114.json new file mode 100644 index 0000000000000000000000000000000000000000..0ae1958e3e1803d8b389dbb5fc1b911879f02483 --- /dev/null +++ b/lamp/data/lamp-114.json @@ -0,0 +1,100 @@ +{ + "id": "lamp-114", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 0, + "y": 120 + }, + "target": { + "x": 123.36, + "y": 158.89 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 160, + "width": 80, + "height": 40 + }, + { + "x": 40, + "y": 200, + "width": 80, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 40, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 70 + }, + { + "length": 70 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -5 + }, + { + "joint": 2, + "angle": 40 + } + ] + }, + "legacy_answer": [ + -5, + 40 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-114\n- segment_count: 2\n- arm_base: (0.0, 120.0)\n- target: (123.36, 158.89)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=70\n- joint 2: length=70\n- obstacles:\n- wall_1: type=stair, pattern=warning_stripes\n part 1: x=0, y=160, width=80, height=40\n part 2: x=40, y=200, width=80, height=40\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=0, y=40, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-115.json b/lamp/data/lamp-115.json new file mode 100644 index 0000000000000000000000000000000000000000..7fc75d420fb665ad5feb82e37c0e713b01b2937c --- /dev/null +++ b/lamp/data/lamp-115.json @@ -0,0 +1,99 @@ +{ + "id": "lamp-115", + "difficulty": 4, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 80, + "y": 80 + }, + "target": { + "x": 242.22, + "y": -12.86 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 0, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 4, + "segments": [ + { + "length": 110 + }, + { + "length": 110 + }, + { + "length": 50 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -15 + }, + { + "joint": 2, + "angle": -80 + }, + { + "joint": 3, + "angle": 105 + }, + { + "joint": 4, + "angle": -5 + } + ] + }, + "legacy_answer": [ + -15, + -80, + 105, + -5 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-115\n- segment_count: 4\n- arm_base: (80.0, 80.0)\n- target: (242.22, -12.86)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=110\n- joint 2: length=110\n- joint 3: length=50\n- joint 4: length=50\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=40, y=0, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-116.json b/lamp/data/lamp-116.json new file mode 100644 index 0000000000000000000000000000000000000000..9516643b6461aa2fa1e883e621eace7765e56589 --- /dev/null +++ b/lamp/data/lamp-116.json @@ -0,0 +1,100 @@ +{ + "id": "lamp-116", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 80, + "y": 0 + }, + "target": { + "x": 230.96, + "y": -28.68 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": 40, + "width": 120, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 200, + "y": 40, + "width": 80, + "height": 40 + }, + { + "x": 200, + "y": 40, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 50 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -35 + }, + { + "joint": 2, + "angle": 0 + } + ] + }, + "legacy_answer": [ + -35, + 0 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-116\n- segment_count: 2\n- arm_base: (80.0, 0.0)\n- target: (230.96, -28.68)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=110\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=80, y=40, width=120, height=40\n- wall_2: type=l_corner, pattern=warning_stripes\n part 1: x=200, y=40, width=80, height=40\n part 2: x=200, y=40, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-117.json b/lamp/data/lamp-117.json new file mode 100644 index 0000000000000000000000000000000000000000..ecf9b8ae60704a8dd1baf7d1b73abb62751c6a9d --- /dev/null +++ b/lamp/data/lamp-117.json @@ -0,0 +1,90 @@ +{ + "id": "lamp-117", + "difficulty": 3, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 80, + "y": 80 + }, + "target": { + "x": 88.69, + "y": 184.92 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": 120, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 3, + "segments": [ + { + "length": 90 + }, + { + "length": 70 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 95 + }, + { + "joint": 2, + "angle": 20 + }, + { + "joint": 3, + "angle": -170 + } + ] + }, + "legacy_answer": [ + 95, + 20, + -170 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-117\n- segment_count: 3\n- arm_base: (80.0, 80.0)\n- target: (88.69, 184.92)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=70\n- joint 3: length=50\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=80, y=120, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-118.json b/lamp/data/lamp-118.json new file mode 100644 index 0000000000000000000000000000000000000000..a1bfa8b51e6307e581ec9672a2a1e41aa337e89c --- /dev/null +++ b/lamp/data/lamp-118.json @@ -0,0 +1,87 @@ +{ + "id": "lamp-118", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 80, + "y": 40 + }, + "target": { + "x": 69.98, + "y": 148.63 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 80, + "width": 80, + "height": 40 + }, + { + "x": 0, + "y": 80, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 70 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 40 + }, + { + "joint": 2, + "angle": 135 + } + ] + }, + "legacy_answer": [ + 40, + 135 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-118\n- segment_count: 2\n- arm_base: (80.0, 40.0)\n- target: (69.98, 148.63)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=70\n- joint 2: length=90\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=0, y=80, width=80, height=40\n part 2: x=0, y=80, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-119.json b/lamp/data/lamp-119.json new file mode 100644 index 0000000000000000000000000000000000000000..1f430bd6d396cacb4b25c058f8c7233a691f6df6 --- /dev/null +++ b/lamp/data/lamp-119.json @@ -0,0 +1,118 @@ +{ + "id": "lamp-119", + "difficulty": 4, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": -40, + "y": 120 + }, + "target": { + "x": -100.03, + "y": 14.17 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": -80, + "y": 0, + "width": 120, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": -80, + "y": 160, + "width": 80, + "height": 40 + }, + { + "x": -80, + "y": 160, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 4, + "segments": [ + { + "length": 50 + }, + { + "length": 70 + }, + { + "length": 110 + }, + { + "length": 70 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 15 + }, + { + "joint": 2, + "angle": -100 + }, + { + "joint": 3, + "angle": 170 + }, + { + "joint": 4, + "angle": -80 + } + ] + }, + "legacy_answer": [ + 15, + -100, + 170, + -80 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-119\n- segment_count: 4\n- arm_base: (-40.0, 120.0)\n- target: (-100.03, 14.17)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=70\n- joint 3: length=110\n- joint 4: length=70\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=-80, y=0, width=120, height=40\n- wall_2: type=l_corner, pattern=warning_stripes\n part 1: x=-80, y=160, width=80, height=40\n part 2: x=-80, y=160, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-120.json b/lamp/data/lamp-120.json new file mode 100644 index 0000000000000000000000000000000000000000..1c860065189349d2f26b77e93ef409175fcf0fb0 --- /dev/null +++ b/lamp/data/lamp-120.json @@ -0,0 +1,100 @@ +{ + "id": "lamp-120", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": -40, + "y": 40 + }, + "target": { + "x": 11.84, + "y": 144.84 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 80, + "width": 120, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": -40, + "y": 160, + "width": 80, + "height": 40 + }, + { + "x": 0, + "y": 200, + "width": 80, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 50 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 110 + }, + { + "joint": 2, + "angle": 40 + } + ] + }, + "legacy_answer": [ + 110, + 40 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-120\n- segment_count: 2\n- arm_base: (-40.0, 40.0)\n- target: (11.84, 144.84)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=90\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=0, y=80, width=120, height=40\n- wall_2: type=stair, pattern=warning_stripes\n part 1: x=-40, y=160, width=80, height=40\n part 2: x=0, y=200, width=80, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-121.json b/lamp/data/lamp-121.json new file mode 100644 index 0000000000000000000000000000000000000000..f510ac7f63f2fa37c7fea2325388387366e089f6 --- /dev/null +++ b/lamp/data/lamp-121.json @@ -0,0 +1,127 @@ +{ + "id": "lamp-121", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 0, + "y": -40 + }, + "target": { + "x": -66.51, + "y": -67.45 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": -40, + "y": 0, + "width": 80, + "height": 40 + }, + { + "x": -40, + "y": 0, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 0, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 50 + }, + { + "length": 50 + }, + { + "length": 50 + }, + { + "length": 70 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -15 + }, + { + "joint": 2, + "angle": -100 + }, + { + "joint": 3, + "angle": -160 + }, + { + "joint": 4, + "angle": 100 + }, + { + "joint": 5, + "angle": -160 + } + ] + }, + "legacy_answer": [ + -15, + -100, + -160, + 100, + -160 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-121\n- segment_count: 5\n- arm_base: (0.0, -40.0)\n- target: (-66.51, -67.45)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=50\n- joint 3: length=50\n- joint 4: length=70\n- joint 5: length=50\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=-40, y=0, width=80, height=40\n part 2: x=-40, y=0, width=40, height=120\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=40, y=0, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-122.json b/lamp/data/lamp-122.json new file mode 100644 index 0000000000000000000000000000000000000000..46d811a90a6674caff9a958fc88ee13b688c4cf8 --- /dev/null +++ b/lamp/data/lamp-122.json @@ -0,0 +1,118 @@ +{ + "id": "lamp-122", + "difficulty": 4, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 80, + "y": 120 + }, + "target": { + "x": 168.69, + "y": 163.98 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": 160, + "width": 80, + "height": 40 + }, + { + "x": 120, + "y": 200, + "width": 80, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 40, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 4, + "segments": [ + { + "length": 50 + }, + { + "length": 50 + }, + { + "length": 110 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -45 + }, + { + "joint": 2, + "angle": 30 + }, + { + "joint": 3, + "angle": 25 + }, + { + "joint": 4, + "angle": 175 + } + ] + }, + "legacy_answer": [ + -45, + 30, + 25, + 175 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-122\n- segment_count: 4\n- arm_base: (80.0, 120.0)\n- target: (168.69, 163.98)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=50\n- joint 3: length=110\n- joint 4: length=90\n- obstacles:\n- wall_1: type=stair, pattern=warning_stripes\n part 1: x=80, y=160, width=80, height=40\n part 2: x=120, y=200, width=80, height=40\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=40, y=40, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-123.json b/lamp/data/lamp-123.json new file mode 100644 index 0000000000000000000000000000000000000000..82a2cbc89ed3d34ee4f8dd76729b81db1fd56e8a --- /dev/null +++ b/lamp/data/lamp-123.json @@ -0,0 +1,109 @@ +{ + "id": "lamp-123", + "difficulty": 3, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 120, + "y": 40 + }, + "target": { + "x": 91.73, + "y": -55.5 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": -40, + "y": -40, + "width": 80, + "height": 40 + }, + { + "x": -40, + "y": -40, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 120, + "y": -40, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 3, + "segments": [ + { + "length": 90 + }, + { + "length": 70 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -130 + }, + { + "joint": 2, + "angle": 65 + }, + { + "joint": 3, + "angle": -90 + } + ] + }, + "legacy_answer": [ + -130, + 65, + -90 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-123\n- segment_count: 3\n- arm_base: (120.0, 40.0)\n- target: (91.73, -55.5)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=70\n- joint 3: length=90\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=-40, y=-40, width=80, height=40\n part 2: x=-40, y=-40, width=40, height=120\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=120, y=-40, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-124.json b/lamp/data/lamp-124.json new file mode 100644 index 0000000000000000000000000000000000000000..1d280c2dcc0af70a053737e063f3f9b55839d64b --- /dev/null +++ b/lamp/data/lamp-124.json @@ -0,0 +1,127 @@ +{ + "id": "lamp-124", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 40, + "y": -80 + }, + "target": { + "x": 20.42, + "y": -21.02 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_vertical", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": -40, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": -40, + "width": 80, + "height": 40 + }, + { + "x": 80, + "y": -40, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 90 + }, + { + "length": 50 + }, + { + "length": 50 + }, + { + "length": 50 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 110 + }, + { + "joint": 2, + "angle": -80 + }, + { + "joint": 3, + "angle": -10 + }, + { + "joint": 4, + "angle": -100 + }, + { + "joint": 5, + "angle": 115 + } + ] + }, + "legacy_answer": [ + 110, + -80, + -10, + -100, + 115 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-124\n- segment_count: 5\n- arm_base: (40.0, -80.0)\n- target: (20.42, -21.02)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=50\n- joint 3: length=50\n- joint 4: length=50\n- joint 5: length=90\n- obstacles:\n- wall_1: type=bar_vertical, pattern=warning_stripes\n part 1: x=40, y=-40, width=40, height=120\n- wall_2: type=l_corner, pattern=warning_stripes\n part 1: x=80, y=-40, width=80, height=40\n part 2: x=80, y=-40, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-125.json b/lamp/data/lamp-125.json new file mode 100644 index 0000000000000000000000000000000000000000..360aa67d84333172013dd630224ab38f28878f7d --- /dev/null +++ b/lamp/data/lamp-125.json @@ -0,0 +1,118 @@ +{ + "id": "lamp-125", + "difficulty": 4, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": -80, + "y": 0 + }, + "target": { + "x": -20.76, + "y": -11.2 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": -40, + "y": 40, + "width": 80, + "height": 40 + }, + { + "x": 0, + "y": 80, + "width": 80, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "bar_vertical", + "pattern": "warning_stripes", + "parts": [ + { + "x": -80, + "y": 40, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 4, + "segments": [ + { + "length": 90 + }, + { + "length": 110 + }, + { + "length": 90 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -50 + }, + { + "joint": 2, + "angle": 10 + }, + { + "joint": 3, + "angle": 135 + }, + { + "joint": 4, + "angle": -150 + } + ] + }, + "legacy_answer": [ + -50, + 10, + 135, + -150 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-125\n- segment_count: 4\n- arm_base: (-80.0, 0.0)\n- target: (-20.76, -11.2)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=110\n- joint 3: length=90\n- joint 4: length=50\n- obstacles:\n- wall_1: type=stair, pattern=warning_stripes\n part 1: x=-40, y=40, width=80, height=40\n part 2: x=0, y=80, width=80, height=40\n- wall_2: type=bar_vertical, pattern=warning_stripes\n part 1: x=-80, y=40, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-126.json b/lamp/data/lamp-126.json new file mode 100644 index 0000000000000000000000000000000000000000..f3737e7d064a2a9628b4d506519345a947ea2dc8 --- /dev/null +++ b/lamp/data/lamp-126.json @@ -0,0 +1,109 @@ +{ + "id": "lamp-126", + "difficulty": 3, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 80, + "y": 120 + }, + "target": { + "x": 175.42, + "y": 68.38 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 160, + "width": 120, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 40, + "width": 80, + "height": 40 + }, + { + "x": 0, + "y": 40, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 3, + "segments": [ + { + "length": 90 + }, + { + "length": 90 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -20 + }, + { + "joint": 2, + "angle": -145 + }, + { + "joint": 3, + "angle": 20 + } + ] + }, + "legacy_answer": [ + -20, + -145, + 20 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-126\n- segment_count: 3\n- arm_base: (80.0, 120.0)\n- target: (175.42, 68.38)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=90\n- joint 3: length=90\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=40, y=160, width=120, height=40\n- wall_2: type=l_corner, pattern=warning_stripes\n part 1: x=0, y=40, width=80, height=40\n part 2: x=0, y=40, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-127.json b/lamp/data/lamp-127.json new file mode 100644 index 0000000000000000000000000000000000000000..b98a04efd5b10668c8729f7fa313e8e0757829a1 --- /dev/null +++ b/lamp/data/lamp-127.json @@ -0,0 +1,96 @@ +{ + "id": "lamp-127", + "difficulty": 3, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 0, + "y": 120 + }, + "target": { + "x": 175.38, + "y": 200.28 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 160, + "width": 80, + "height": 40 + }, + { + "x": 80, + "y": 200, + "width": 80, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 3, + "segments": [ + { + "length": 50 + }, + { + "length": 70 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -15 + }, + { + "joint": 2, + "angle": 25 + }, + { + "joint": 3, + "angle": 45 + } + ] + }, + "legacy_answer": [ + -15, + 25, + 45 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-127\n- segment_count: 3\n- arm_base: (0.0, 120.0)\n- target: (175.38, 200.28)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=70\n- joint 3: length=90\n- obstacles:\n- wall_1: type=stair, pattern=warning_stripes\n part 1: x=40, y=160, width=80, height=40\n part 2: x=80, y=200, width=80, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-128.json b/lamp/data/lamp-128.json new file mode 100644 index 0000000000000000000000000000000000000000..0edd6165077fc2314a96950c9d21aa432c5a9cfa --- /dev/null +++ b/lamp/data/lamp-128.json @@ -0,0 +1,100 @@ +{ + "id": "lamp-128", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 80, + "y": 80 + }, + "target": { + "x": 104.99, + "y": 0.73 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_vertical", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 40, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 120, + "width": 80, + "height": 40 + }, + { + "x": 80, + "y": 160, + "width": 80, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 90 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -10 + }, + { + "joint": 2, + "angle": -135 + } + ] + }, + "legacy_answer": [ + -10, + -135 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-128\n- segment_count: 2\n- arm_base: (80.0, 80.0)\n- target: (104.99, 0.73)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=90\n- obstacles:\n- wall_1: type=bar_vertical, pattern=warning_stripes\n part 1: x=0, y=40, width=40, height=120\n- wall_2: type=stair, pattern=warning_stripes\n part 1: x=40, y=120, width=80, height=40\n part 2: x=80, y=160, width=80, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-129.json b/lamp/data/lamp-129.json new file mode 100644 index 0000000000000000000000000000000000000000..e4ab2e5c09e333456220bce933b05358cdb8f84e --- /dev/null +++ b/lamp/data/lamp-129.json @@ -0,0 +1,127 @@ +{ + "id": "lamp-129", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 80, + "y": 0 + }, + "target": { + "x": 238.99, + "y": 7.68 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": 40, + "width": 80, + "height": 40 + }, + { + "x": 120, + "y": 80, + "width": 80, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": -80, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 110 + }, + { + "length": 50 + }, + { + "length": 50 + }, + { + "length": 50 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 0 + }, + { + "joint": 2, + "angle": -120 + }, + { + "joint": 3, + "angle": 45 + }, + { + "joint": 4, + "angle": -180 + }, + { + "joint": 5, + "angle": 10 + } + ] + }, + "legacy_answer": [ + 0, + -120, + 45, + -180, + 10 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-129\n- segment_count: 5\n- arm_base: (80.0, 0.0)\n- target: (238.99, 7.68)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=110\n- joint 2: length=50\n- joint 3: length=50\n- joint 4: length=50\n- joint 5: length=90\n- obstacles:\n- wall_1: type=stair, pattern=warning_stripes\n part 1: x=80, y=40, width=80, height=40\n part 2: x=120, y=80, width=80, height=40\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=40, y=-80, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-130.json b/lamp/data/lamp-130.json new file mode 100644 index 0000000000000000000000000000000000000000..40cea638413f19dab95ba51411efdcf4d3525707 --- /dev/null +++ b/lamp/data/lamp-130.json @@ -0,0 +1,121 @@ +{ + "id": "lamp-130", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": -40, + "y": 80 + }, + "target": { + "x": -90.58, + "y": -34.71 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "block", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": -40, + "width": 80, + "height": 80 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": -80, + "y": 120, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 50 + }, + { + "length": 70 + }, + { + "length": 90 + }, + { + "length": 50 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 160 + }, + { + "joint": 2, + "angle": -45 + }, + { + "joint": 3, + "angle": -85 + }, + { + "joint": 4, + "angle": -25 + }, + { + "joint": 5, + "angle": 165 + } + ] + }, + "legacy_answer": [ + 160, + -45, + -85, + -25, + 165 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-130\n- segment_count: 5\n- arm_base: (-40.0, 80.0)\n- target: (-90.58, -34.71)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=70\n- joint 3: length=90\n- joint 4: length=50\n- joint 5: length=110\n- obstacles:\n- wall_1: type=block, pattern=warning_stripes\n part 1: x=0, y=-40, width=80, height=80\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=-80, y=120, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-131.json b/lamp/data/lamp-131.json new file mode 100644 index 0000000000000000000000000000000000000000..5529d4aec2eabc5b5e236888b5f5f357d625dddd --- /dev/null +++ b/lamp/data/lamp-131.json @@ -0,0 +1,124 @@ +{ + "id": "lamp-131", + "difficulty": 4, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 80, + "y": 80 + }, + "target": { + "x": 36.68, + "y": 193.11 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": 120, + "width": 80, + "height": 40 + }, + { + "x": 80, + "y": 120, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 200, + "width": 80, + "height": 40 + }, + { + "x": 40, + "y": 240, + "width": 80, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 4, + "segments": [ + { + "length": 50 + }, + { + "length": 50 + }, + { + "length": 50 + }, + { + "length": 70 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 115 + }, + { + "joint": 2, + "angle": 115 + }, + { + "joint": 3, + "angle": -120 + }, + { + "joint": 4, + "angle": 70 + } + ] + }, + "legacy_answer": [ + 115, + 115, + -120, + 70 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-131\n- segment_count: 4\n- arm_base: (80.0, 80.0)\n- target: (36.68, 193.11)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=50\n- joint 3: length=50\n- joint 4: length=70\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=80, y=120, width=80, height=40\n part 2: x=80, y=120, width=40, height=120\n- wall_2: type=stair, pattern=warning_stripes\n part 1: x=0, y=200, width=80, height=40\n part 2: x=40, y=240, width=80, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-132.json b/lamp/data/lamp-132.json new file mode 100644 index 0000000000000000000000000000000000000000..2fbc7f7ccb457d87adaa39c6bd7a2cc311b6fb1b --- /dev/null +++ b/lamp/data/lamp-132.json @@ -0,0 +1,109 @@ +{ + "id": "lamp-132", + "difficulty": 3, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 80, + "y": 120 + }, + "target": { + "x": 80.62, + "y": 180.16 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 200, + "width": 80, + "height": 40 + }, + { + "x": 80, + "y": 240, + "width": 80, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 40, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 3, + "segments": [ + { + "length": 90 + }, + { + "length": 90 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -180 + }, + { + "joint": 2, + "angle": 100 + }, + { + "joint": 3, + "angle": -15 + } + ] + }, + "legacy_answer": [ + -180, + 100, + -15 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-132\n- segment_count: 3\n- arm_base: (80.0, 120.0)\n- target: (80.62, 180.16)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=90\n- joint 3: length=110\n- obstacles:\n- wall_1: type=stair, pattern=warning_stripes\n part 1: x=40, y=200, width=80, height=40\n part 2: x=80, y=240, width=80, height=40\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=40, y=40, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-133.json b/lamp/data/lamp-133.json new file mode 100644 index 0000000000000000000000000000000000000000..3c0bb88358dd36d1c3a7dba5bd52b13661d3d414 --- /dev/null +++ b/lamp/data/lamp-133.json @@ -0,0 +1,105 @@ +{ + "id": "lamp-133", + "difficulty": 4, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": -40, + "y": 0 + }, + "target": { + "x": -12.64, + "y": 180.72 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": -80, + "y": 80, + "width": 80, + "height": 40 + }, + { + "x": -80, + "y": 80, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 4, + "segments": [ + { + "length": 70 + }, + { + "length": 90 + }, + { + "length": 70 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -10 + }, + { + "joint": 2, + "angle": 145 + }, + { + "joint": 3, + "angle": 30 + }, + { + "joint": 4, + "angle": 105 + } + ] + }, + "legacy_answer": [ + -10, + 145, + 30, + 105 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-133\n- segment_count: 4\n- arm_base: (-40.0, 0.0)\n- target: (-12.64, 180.72)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=70\n- joint 2: length=90\n- joint 3: length=70\n- joint 4: length=110\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=-80, y=80, width=80, height=40\n part 2: x=-80, y=80, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-134.json b/lamp/data/lamp-134.json new file mode 100644 index 0000000000000000000000000000000000000000..088311cf3757c5c8c89f9797466c72576036be80 --- /dev/null +++ b/lamp/data/lamp-134.json @@ -0,0 +1,109 @@ +{ + "id": "lamp-134", + "difficulty": 3, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 0, + "y": 80 + }, + "target": { + "x": 29.35, + "y": -25.05 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 120, + "width": 80, + "height": 40 + }, + { + "x": 40, + "y": 120, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": 0, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 3, + "segments": [ + { + "length": 110 + }, + { + "length": 50 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -50 + }, + { + "joint": 2, + "angle": -15 + }, + { + "joint": 3, + "angle": -175 + } + ] + }, + "legacy_answer": [ + -50, + -15, + -175 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-134\n- segment_count: 3\n- arm_base: (0.0, 80.0)\n- target: (29.35, -25.05)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=110\n- joint 2: length=50\n- joint 3: length=90\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=40, y=120, width=80, height=40\n part 2: x=40, y=120, width=40, height=120\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=80, y=0, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-135.json b/lamp/data/lamp-135.json new file mode 100644 index 0000000000000000000000000000000000000000..4a7cfa2f53b13f8c45e6092b0b45f89ff9ba3c58 --- /dev/null +++ b/lamp/data/lamp-135.json @@ -0,0 +1,109 @@ +{ + "id": "lamp-135", + "difficulty": 3, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 0, + "y": 120 + }, + "target": { + "x": 70.72, + "y": 121.99 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 160, + "width": 80, + "height": 40 + }, + { + "x": 40, + "y": 160, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "block", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 0, + "width": 80, + "height": 80 + } + ] + } + ], + "arm": { + "segmentCount": 3, + "segments": [ + { + "length": 50 + }, + { + "length": 50 + }, + { + "length": 70 + } + ], + "initialAngles": [ + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 130 + }, + { + "joint": 2, + "angle": 10 + }, + { + "joint": 3, + "angle": -40 + } + ] + }, + "legacy_answer": [ + 130, + 10, + -40 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-135\n- segment_count: 3\n- arm_base: (0.0, 120.0)\n- target: (70.72, 121.99)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=50\n- joint 3: length=70\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=40, y=160, width=80, height=40\n part 2: x=40, y=160, width=40, height=120\n- wall_2: type=block, pattern=warning_stripes\n part 1: x=0, y=0, width=80, height=80\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-136.json b/lamp/data/lamp-136.json new file mode 100644 index 0000000000000000000000000000000000000000..2ee8a154662d7da0b670ea73a35725361fb6ef70 --- /dev/null +++ b/lamp/data/lamp-136.json @@ -0,0 +1,96 @@ +{ + "id": "lamp-136", + "difficulty": 3, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 0, + "y": 80 + }, + "target": { + "x": 130.79, + "y": 239.52 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 160, + "width": 80, + "height": 40 + }, + { + "x": 40, + "y": 200, + "width": 80, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 3, + "segments": [ + { + "length": 50 + }, + { + "length": 110 + }, + { + "length": 70 + } + ], + "initialAngles": [ + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 60 + }, + { + "joint": 2, + "angle": 25 + }, + { + "joint": 3, + "angle": 85 + } + ] + }, + "legacy_answer": [ + 60, + 25, + 85 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-136\n- segment_count: 3\n- arm_base: (0.0, 80.0)\n- target: (130.79, 239.52)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=110\n- joint 3: length=70\n- obstacles:\n- wall_1: type=stair, pattern=warning_stripes\n part 1: x=0, y=160, width=80, height=40\n part 2: x=40, y=200, width=80, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-137.json b/lamp/data/lamp-137.json new file mode 100644 index 0000000000000000000000000000000000000000..a512de6dd6d2272fb9224dbe3fac8f5522af3a1c --- /dev/null +++ b/lamp/data/lamp-137.json @@ -0,0 +1,100 @@ +{ + "id": "lamp-137", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 40, + "y": -40 + }, + "target": { + "x": 48.19, + "y": -107.55 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_vertical", + "pattern": "warning_stripes", + "parts": [ + { + "x": -40, + "y": -80, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 0, + "width": 80, + "height": 40 + }, + { + "x": 80, + "y": 40, + "width": 80, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 110 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -65 + }, + { + "joint": 2, + "angle": 140 + } + ] + }, + "legacy_answer": [ + -65, + 140 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-137\n- segment_count: 2\n- arm_base: (40.0, -40.0)\n- target: (48.19, -107.55)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=110\n- joint 2: length=50\n- obstacles:\n- wall_1: type=bar_vertical, pattern=warning_stripes\n part 1: x=-40, y=-80, width=40, height=120\n- wall_2: type=stair, pattern=warning_stripes\n part 1: x=40, y=0, width=80, height=40\n part 2: x=80, y=40, width=80, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-138.json b/lamp/data/lamp-138.json new file mode 100644 index 0000000000000000000000000000000000000000..8d4b043fa4167b10a9826ee3060f5327c8bd8f59 --- /dev/null +++ b/lamp/data/lamp-138.json @@ -0,0 +1,106 @@ +{ + "id": "lamp-138", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 0, + "y": 40 + }, + "target": { + "x": 109.01, + "y": -12.13 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 80, + "width": 80, + "height": 40 + }, + { + "x": 0, + "y": 80, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": 80, + "width": 80, + "height": 40 + }, + { + "x": 120, + "y": 120, + "width": 80, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 110 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -50 + }, + { + "joint": 2, + "angle": 40 + } + ] + }, + "legacy_answer": [ + -50, + 40 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-138\n- segment_count: 2\n- arm_base: (0.0, 40.0)\n- target: (109.01, -12.13)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=110\n- joint 2: length=50\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=0, y=80, width=80, height=40\n part 2: x=0, y=80, width=40, height=120\n- wall_2: type=stair, pattern=warning_stripes\n part 1: x=80, y=80, width=80, height=40\n part 2: x=120, y=120, width=80, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-139.json b/lamp/data/lamp-139.json new file mode 100644 index 0000000000000000000000000000000000000000..3af7ee6f457f91e0158318a69bd9965645206652 --- /dev/null +++ b/lamp/data/lamp-139.json @@ -0,0 +1,100 @@ +{ + "id": "lamp-139", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 80, + "y": 40 + }, + "target": { + "x": -43.62, + "y": -5 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": -40, + "y": 80, + "width": 120, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": -80, + "y": 40, + "width": 80, + "height": 40 + }, + { + "x": -80, + "y": 40, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 70 + }, + { + "length": 70 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -180 + }, + { + "joint": 2, + "angle": -140 + } + ] + }, + "legacy_answer": [ + -180, + -140 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-139\n- segment_count: 2\n- arm_base: (80.0, 40.0)\n- target: (-43.62, -5.0)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=70\n- joint 2: length=70\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=-40, y=80, width=120, height=40\n- wall_2: type=l_corner, pattern=warning_stripes\n part 1: x=-80, y=40, width=80, height=40\n part 2: x=-80, y=40, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-140.json b/lamp/data/lamp-140.json new file mode 100644 index 0000000000000000000000000000000000000000..eacb5ddc7d612c50c677a1fee00220a393d69213 --- /dev/null +++ b/lamp/data/lamp-140.json @@ -0,0 +1,103 @@ +{ + "id": "lamp-140", + "difficulty": 3, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 80, + "y": 0 + }, + "target": { + "x": 199.1, + "y": 281.53 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_vertical", + "pattern": "warning_stripes", + "parts": [ + { + "x": 160, + "y": 80, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "block", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 80, + "width": 80, + "height": 80 + } + ] + } + ], + "arm": { + "segmentCount": 3, + "segments": [ + { + "length": 90 + }, + { + "length": 110 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 60 + }, + { + "joint": 2, + "angle": 80 + }, + { + "joint": 3, + "angle": 60 + } + ] + }, + "legacy_answer": [ + 60, + 80, + 60 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-140\n- segment_count: 3\n- arm_base: (80.0, 0.0)\n- target: (199.1, 281.53)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=110\n- joint 3: length=110\n- obstacles:\n- wall_1: type=bar_vertical, pattern=warning_stripes\n part 1: x=160, y=80, width=40, height=120\n- wall_2: type=block, pattern=warning_stripes\n part 1: x=40, y=80, width=80, height=80\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-141.json b/lamp/data/lamp-141.json new file mode 100644 index 0000000000000000000000000000000000000000..167c344083b5efbd2fbcac4f501607d66beee19f --- /dev/null +++ b/lamp/data/lamp-141.json @@ -0,0 +1,96 @@ +{ + "id": "lamp-141", + "difficulty": 3, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 0, + "y": 40 + }, + "target": { + "x": 40.5, + "y": 209.85 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 80, + "width": 80, + "height": 40 + }, + { + "x": 40, + "y": 120, + "width": 80, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 3, + "segments": [ + { + "length": 90 + }, + { + "length": 70 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 150 + }, + { + "joint": 2, + "angle": 25 + }, + { + "joint": 3, + "angle": 60 + } + ] + }, + "legacy_answer": [ + 150, + 25, + 60 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-141\n- segment_count: 3\n- arm_base: (0.0, 40.0)\n- target: (40.5, 209.85)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=70\n- joint 3: length=110\n- obstacles:\n- wall_1: type=stair, pattern=warning_stripes\n part 1: x=0, y=80, width=80, height=40\n part 2: x=40, y=120, width=80, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-142.json b/lamp/data/lamp-142.json new file mode 100644 index 0000000000000000000000000000000000000000..3b94d5d39a36dac43380bff70fc4d56d54ef2ecc --- /dev/null +++ b/lamp/data/lamp-142.json @@ -0,0 +1,127 @@ +{ + "id": "lamp-142", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 120, + "y": 40 + }, + "target": { + "x": 466.95, + "y": 40.32 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 200, + "y": 80, + "width": 120, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 320, + "y": 80, + "width": 80, + "height": 40 + }, + { + "x": 320, + "y": 80, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 70 + }, + { + "length": 90 + }, + { + "length": 70 + }, + { + "length": 110 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 10 + }, + { + "joint": 2, + "angle": -30 + }, + { + "joint": 3, + "angle": -10 + }, + { + "joint": 4, + "angle": 0 + }, + { + "joint": 5, + "angle": 65 + } + ] + }, + "legacy_answer": [ + 10, + -30, + -10, + 0, + 65 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-142\n- segment_count: 5\n- arm_base: (120.0, 40.0)\n- target: (466.95, 40.32)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=70\n- joint 2: length=90\n- joint 3: length=70\n- joint 4: length=110\n- joint 5: length=50\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=200, y=80, width=120, height=40\n- wall_2: type=l_corner, pattern=warning_stripes\n part 1: x=320, y=80, width=80, height=40\n part 2: x=320, y=80, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-143.json b/lamp/data/lamp-143.json new file mode 100644 index 0000000000000000000000000000000000000000..56451bb3ab9b3099124345c8fbf1187056091ef7 --- /dev/null +++ b/lamp/data/lamp-143.json @@ -0,0 +1,108 @@ +{ + "id": "lamp-143", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 40, + "y": 40 + }, + "target": { + "x": 56.05, + "y": 275.28 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 200, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 50 + }, + { + "length": 50 + }, + { + "length": 70 + }, + { + "length": 110 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -10 + }, + { + "joint": 2, + "angle": 75 + }, + { + "joint": 3, + "angle": 120 + }, + { + "joint": 4, + "angle": 115 + }, + { + "joint": 5, + "angle": 45 + } + ] + }, + "legacy_answer": [ + -10, + 75, + 120, + 115, + 45 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-143\n- segment_count: 5\n- arm_base: (40.0, 40.0)\n- target: (56.05, 275.28)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=50\n- joint 3: length=70\n- joint 4: length=110\n- joint 5: length=50\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=40, y=200, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-144.json b/lamp/data/lamp-144.json new file mode 100644 index 0000000000000000000000000000000000000000..e9720e2cfa4110bf99281ba3863d4cc64ec20135 --- /dev/null +++ b/lamp/data/lamp-144.json @@ -0,0 +1,118 @@ +{ + "id": "lamp-144", + "difficulty": 4, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 40, + "y": -40 + }, + "target": { + "x": 99.94, + "y": 60.46 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": -40, + "y": 40, + "width": 120, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 80, + "width": 80, + "height": 40 + }, + { + "x": 40, + "y": 80, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 4, + "segments": [ + { + "length": 90 + }, + { + "length": 50 + }, + { + "length": 110 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -115 + }, + { + "joint": 2, + "angle": 45 + }, + { + "joint": 3, + "angle": 70 + }, + { + "joint": 4, + "angle": 60 + } + ] + }, + "legacy_answer": [ + -115, + 45, + 70, + 60 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-144\n- segment_count: 4\n- arm_base: (40.0, -40.0)\n- target: (99.94, 60.46)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=50\n- joint 3: length=110\n- joint 4: length=50\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=-40, y=40, width=120, height=40\n- wall_2: type=l_corner, pattern=warning_stripes\n part 1: x=40, y=80, width=80, height=40\n part 2: x=40, y=80, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-145.json b/lamp/data/lamp-145.json new file mode 100644 index 0000000000000000000000000000000000000000..54e463868d522505a133d7ab87be41a325eb69e9 --- /dev/null +++ b/lamp/data/lamp-145.json @@ -0,0 +1,133 @@ +{ + "id": "lamp-145", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 120, + "y": -40 + }, + "target": { + "x": 44.05, + "y": -84.02 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": -40, + "width": 80, + "height": 40 + }, + { + "x": 0, + "y": -40, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 0, + "width": 80, + "height": 40 + }, + { + "x": 80, + "y": 40, + "width": 80, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 50 + }, + { + "length": 50 + }, + { + "length": 70 + }, + { + "length": 90 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -80 + }, + { + "joint": 2, + "angle": -155 + }, + { + "joint": 3, + "angle": 140 + }, + { + "joint": 4, + "angle": -135 + }, + { + "joint": 5, + "angle": 30 + } + ] + }, + "legacy_answer": [ + -80, + -155, + 140, + -135, + 30 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-145\n- segment_count: 5\n- arm_base: (120.0, -40.0)\n- target: (44.05, -84.02)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=50\n- joint 3: length=70\n- joint 4: length=90\n- joint 5: length=90\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=0, y=-40, width=80, height=40\n part 2: x=0, y=-40, width=40, height=120\n- wall_2: type=stair, pattern=warning_stripes\n part 1: x=40, y=0, width=80, height=40\n part 2: x=80, y=40, width=80, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-146.json b/lamp/data/lamp-146.json new file mode 100644 index 0000000000000000000000000000000000000000..1beb6cce9845ab7c2fc27a0b853fb8ff1f0d63a5 --- /dev/null +++ b/lamp/data/lamp-146.json @@ -0,0 +1,105 @@ +{ + "id": "lamp-146", + "difficulty": 4, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 80, + "y": 120 + }, + "target": { + "x": 33.17, + "y": 219.83 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 200, + "width": 80, + "height": 40 + }, + { + "x": 40, + "y": 200, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 4, + "segments": [ + { + "length": 50 + }, + { + "length": 110 + }, + { + "length": 70 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -140 + }, + { + "joint": 2, + "angle": 85 + }, + { + "joint": 3, + "angle": -105 + }, + { + "joint": 4, + "angle": 90 + } + ] + }, + "legacy_answer": [ + -140, + 85, + -105, + 90 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-146\n- segment_count: 4\n- arm_base: (80.0, 120.0)\n- target: (33.17, 219.83)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=110\n- joint 3: length=70\n- joint 4: length=90\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=40, y=200, width=80, height=40\n part 2: x=40, y=200, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-147.json b/lamp/data/lamp-147.json new file mode 100644 index 0000000000000000000000000000000000000000..b93ab042df437ea124486dcdd0acd387b646a657 --- /dev/null +++ b/lamp/data/lamp-147.json @@ -0,0 +1,127 @@ +{ + "id": "lamp-147", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 120, + "y": 40 + }, + "target": { + "x": 223.2, + "y": 167.01 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 120, + "y": 160, + "width": 80, + "height": 40 + }, + { + "x": 160, + "y": 200, + "width": 80, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 120, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 50 + }, + { + "length": 90 + }, + { + "length": 90 + }, + { + "length": 50 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 110 + }, + { + "joint": 2, + "angle": 10 + }, + { + "joint": 3, + "angle": -145 + }, + { + "joint": 4, + "angle": 65 + }, + { + "joint": 5, + "angle": 40 + } + ] + }, + "legacy_answer": [ + 110, + 10, + -145, + 65, + 40 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-147\n- segment_count: 5\n- arm_base: (120.0, 40.0)\n- target: (223.2, 167.01)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=90\n- joint 3: length=90\n- joint 4: length=50\n- joint 5: length=110\n- obstacles:\n- wall_1: type=stair, pattern=warning_stripes\n part 1: x=120, y=160, width=80, height=40\n part 2: x=160, y=200, width=80, height=40\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=40, y=120, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-148.json b/lamp/data/lamp-148.json new file mode 100644 index 0000000000000000000000000000000000000000..be5e63d069f04f42438ae3bf53132adfe1705284 --- /dev/null +++ b/lamp/data/lamp-148.json @@ -0,0 +1,109 @@ +{ + "id": "lamp-148", + "difficulty": 3, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 120, + "y": 0 + }, + "target": { + "x": 138.24, + "y": 88.63 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 80, + "width": 80, + "height": 40 + }, + { + "x": 40, + "y": 80, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": 120, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 3, + "segments": [ + { + "length": 70 + }, + { + "length": 110 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 55 + }, + { + "joint": 2, + "angle": -155 + }, + { + "joint": 3, + "angle": 45 + } + ] + }, + "legacy_answer": [ + 55, + -155, + 45 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-148\n- segment_count: 3\n- arm_base: (120.0, 0.0)\n- target: (138.24, 88.63)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=70\n- joint 2: length=110\n- joint 3: length=110\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=40, y=80, width=80, height=40\n part 2: x=40, y=80, width=40, height=120\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=80, y=120, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-149.json b/lamp/data/lamp-149.json new file mode 100644 index 0000000000000000000000000000000000000000..c455a4ec8a090301f35e1ccc41de69ce7a6ef375 --- /dev/null +++ b/lamp/data/lamp-149.json @@ -0,0 +1,100 @@ +{ + "id": "lamp-149", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 120, + "y": 120 + }, + "target": { + "x": 238.72, + "y": 146.32 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 120, + "y": 40, + "width": 120, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 160, + "y": 200, + "width": 80, + "height": 40 + }, + { + "x": 160, + "y": 200, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 90 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 60 + }, + { + "joint": 2, + "angle": -35 + } + ] + }, + "legacy_answer": [ + 60, + -35 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-149\n- segment_count: 2\n- arm_base: (120.0, 120.0)\n- target: (238.72, 146.32)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=90\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=120, y=40, width=120, height=40\n- wall_2: type=l_corner, pattern=warning_stripes\n part 1: x=160, y=200, width=80, height=40\n part 2: x=160, y=200, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-150.json b/lamp/data/lamp-150.json new file mode 100644 index 0000000000000000000000000000000000000000..e94854caa1b2846a1b6927b6c068f71bf9108e53 --- /dev/null +++ b/lamp/data/lamp-150.json @@ -0,0 +1,96 @@ +{ + "id": "lamp-150", + "difficulty": 3, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 40, + "y": 40 + }, + "target": { + "x": 79.54, + "y": 159.54 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 80, + "width": 80, + "height": 40 + }, + { + "x": 80, + "y": 120, + "width": 80, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 3, + "segments": [ + { + "length": 70 + }, + { + "length": 50 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 95 + }, + { + "joint": 2, + "angle": 95 + }, + { + "joint": 3, + "angle": 0 + } + ] + }, + "legacy_answer": [ + 95, + 95, + 0 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-150\n- segment_count: 3\n- arm_base: (40.0, 40.0)\n- target: (79.54, 159.54)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=70\n- joint 2: length=50\n- joint 3: length=50\n- obstacles:\n- wall_1: type=stair, pattern=warning_stripes\n part 1: x=40, y=80, width=80, height=40\n part 2: x=80, y=120, width=80, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-151.json b/lamp/data/lamp-151.json new file mode 100644 index 0000000000000000000000000000000000000000..c6314b36ce9e2e7d50eab98e3288bf6d2ccc1ed3 --- /dev/null +++ b/lamp/data/lamp-151.json @@ -0,0 +1,99 @@ +{ + "id": "lamp-151", + "difficulty": 4, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 40, + "y": -80 + }, + "target": { + "x": 166.1, + "y": 5.15 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": -40, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 4, + "segments": [ + { + "length": 50 + }, + { + "length": 90 + }, + { + "length": 70 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 20 + }, + { + "joint": 2, + "angle": 110 + }, + { + "joint": 3, + "angle": 10 + }, + { + "joint": 4, + "angle": -35 + } + ] + }, + "legacy_answer": [ + 20, + 110, + 10, + -35 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-151\n- segment_count: 4\n- arm_base: (40.0, -80.0)\n- target: (166.1, 5.15)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=90\n- joint 3: length=70\n- joint 4: length=50\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=80, y=-40, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-152.json b/lamp/data/lamp-152.json new file mode 100644 index 0000000000000000000000000000000000000000..af90a817652d20cbcdc2d187417e916cd01df3c4 --- /dev/null +++ b/lamp/data/lamp-152.json @@ -0,0 +1,118 @@ +{ + "id": "lamp-152", + "difficulty": 4, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 40, + "y": 80 + }, + "target": { + "x": 79.78, + "y": -91.48 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 0, + "width": 120, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": -80, + "width": 80, + "height": 40 + }, + { + "x": 40, + "y": -40, + "width": 80, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 4, + "segments": [ + { + "length": 110 + }, + { + "length": 110 + }, + { + "length": 50 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -25 + }, + { + "joint": 2, + "angle": -70 + }, + { + "joint": 3, + "angle": -165 + }, + { + "joint": 4, + "angle": -170 + } + ] + }, + "legacy_answer": [ + -25, + -70, + -165, + -170 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-152\n- segment_count: 4\n- arm_base: (40.0, 80.0)\n- target: (79.78, -91.48)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=110\n- joint 2: length=110\n- joint 3: length=50\n- joint 4: length=50\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=0, y=0, width=120, height=40\n- wall_2: type=stair, pattern=warning_stripes\n part 1: x=0, y=-80, width=80, height=40\n part 2: x=40, y=-40, width=80, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-553.json b/lamp/data/lamp-553.json new file mode 100644 index 0000000000000000000000000000000000000000..e77ac18a5af4f7a2a8918e8ce25ddbf423316df8 --- /dev/null +++ b/lamp/data/lamp-553.json @@ -0,0 +1,121 @@ +{ + "id": "lamp-553", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 120, + "y": 120 + }, + "target": { + "x": -29.11, + "y": 133.96 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_vertical", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 120, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "bar_vertical", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 120, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 90 + }, + { + "length": 50 + }, + { + "length": 90 + }, + { + "length": 70 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -100 + }, + { + "joint": 2, + "angle": -40 + }, + { + "joint": 3, + "angle": 130 + }, + { + "joint": 4, + "angle": -170 + }, + { + "joint": 5, + "angle": 120 + } + ] + }, + "legacy_answer": [ + -100, + -40, + 130, + -170, + 120 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-553\n- segment_count: 5\n- arm_base: (120.0, 120.0)\n- target: (-29.11, 133.96)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=50\n- joint 3: length=90\n- joint 4: length=70\n- joint 5: length=90\n- obstacles:\n- wall_1: type=bar_vertical, pattern=warning_stripes\n part 1: x=0, y=120, width=40, height=120\n- wall_2: type=bar_vertical, pattern=warning_stripes\n part 1: x=40, y=120, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-554.json b/lamp/data/lamp-554.json new file mode 100644 index 0000000000000000000000000000000000000000..7bfbe684dbf80e0f6402efeb1287237af4fa6fd7 --- /dev/null +++ b/lamp/data/lamp-554.json @@ -0,0 +1,94 @@ +{ + "id": "lamp-554", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 40, + "y": 80 + }, + "target": { + "x": -21.29, + "y": 76.65 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": -40, + "y": 0, + "width": 120, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "block", + "pattern": "warning_stripes", + "parts": [ + { + "x": -80, + "y": 80, + "width": 80, + "height": 80 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 50 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -15 + }, + { + "joint": 2, + "angle": 175 + } + ] + }, + "legacy_answer": [ + -15, + 175 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-554\n- segment_count: 2\n- arm_base: (40.0, 80.0)\n- target: (-21.29, 76.65)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=110\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=-40, y=0, width=120, height=40\n- wall_2: type=block, pattern=warning_stripes\n part 1: x=-80, y=80, width=80, height=80\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-555.json b/lamp/data/lamp-555.json new file mode 100644 index 0000000000000000000000000000000000000000..a9c3e647894014d2fc9d16a7a8916b3e08457ed8 --- /dev/null +++ b/lamp/data/lamp-555.json @@ -0,0 +1,127 @@ +{ + "id": "lamp-555", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 120, + "y": 40 + }, + "target": { + "x": 56.78, + "y": -18.79 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": -80, + "width": 120, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": -40, + "y": 0, + "width": 80, + "height": 40 + }, + { + "x": -40, + "y": 0, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 70 + }, + { + "length": 70 + }, + { + "length": 70 + }, + { + "length": 90 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -35 + }, + { + "joint": 2, + "angle": -165 + }, + { + "joint": 3, + "angle": 40 + }, + { + "joint": 4, + "angle": 140 + }, + { + "joint": 5, + "angle": -110 + } + ] + }, + "legacy_answer": [ + -35, + -165, + 40, + 140, + -110 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-555\n- segment_count: 5\n- arm_base: (120.0, 40.0)\n- target: (56.78, -18.79)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=70\n- joint 2: length=70\n- joint 3: length=70\n- joint 4: length=90\n- joint 5: length=110\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=0, y=-80, width=120, height=40\n- wall_2: type=l_corner, pattern=warning_stripes\n part 1: x=-40, y=0, width=80, height=40\n part 2: x=-40, y=0, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-556.json b/lamp/data/lamp-556.json new file mode 100644 index 0000000000000000000000000000000000000000..1fead3d9ec65fc36413d39609ea5b70f8c729a67 --- /dev/null +++ b/lamp/data/lamp-556.json @@ -0,0 +1,114 @@ +{ + "id": "lamp-556", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 80, + "y": 0 + }, + "target": { + "x": 117.97, + "y": 129.59 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": 40, + "width": 80, + "height": 40 + }, + { + "x": 120, + "y": 80, + "width": 80, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 70 + }, + { + "length": 90 + }, + { + "length": 70 + }, + { + "length": 50 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 145 + }, + { + "joint": 2, + "angle": 95 + }, + { + "joint": 3, + "angle": -105 + }, + { + "joint": 4, + "angle": 75 + }, + { + "joint": 5, + "angle": 10 + } + ] + }, + "legacy_answer": [ + 145, + 95, + -105, + 75, + 10 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-556\n- segment_count: 5\n- arm_base: (80.0, 0.0)\n- target: (117.97, 129.59)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=70\n- joint 2: length=90\n- joint 3: length=70\n- joint 4: length=50\n- joint 5: length=110\n- obstacles:\n- wall_1: type=stair, pattern=warning_stripes\n part 1: x=80, y=40, width=80, height=40\n part 2: x=120, y=80, width=80, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-557.json b/lamp/data/lamp-557.json new file mode 100644 index 0000000000000000000000000000000000000000..3ae580587f33f48a29dd7b7323305e31eb750ec2 --- /dev/null +++ b/lamp/data/lamp-557.json @@ -0,0 +1,115 @@ +{ + "id": "lamp-557", + "difficulty": 3, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 40, + "y": 80 + }, + "target": { + "x": -43.49, + "y": 17.4 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": -40, + "width": 80, + "height": 40 + }, + { + "x": 40, + "y": 0, + "width": 80, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": -40, + "y": 120, + "width": 80, + "height": 40 + }, + { + "x": -40, + "y": 120, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 3, + "segments": [ + { + "length": 50 + }, + { + "length": 90 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -40 + }, + { + "joint": 2, + "angle": 175 + }, + { + "joint": 3, + "angle": -130 + } + ] + }, + "legacy_answer": [ + -40, + 175, + -130 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-557\n- segment_count: 3\n- arm_base: (40.0, 80.0)\n- target: (-43.49, 17.4)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=90\n- joint 3: length=50\n- obstacles:\n- wall_1: type=stair, pattern=warning_stripes\n part 1: x=0, y=-40, width=80, height=40\n part 2: x=40, y=0, width=80, height=40\n- wall_2: type=l_corner, pattern=warning_stripes\n part 1: x=-40, y=120, width=80, height=40\n part 2: x=-40, y=120, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-558.json b/lamp/data/lamp-558.json new file mode 100644 index 0000000000000000000000000000000000000000..c0ab78d555b802c30e6a58f566f14f0294943ad8 --- /dev/null +++ b/lamp/data/lamp-558.json @@ -0,0 +1,127 @@ +{ + "id": "lamp-558", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 120, + "y": 40 + }, + "target": { + "x": 197.9, + "y": 191.32 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "block", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": 120, + "width": 80, + "height": 80 + } + ] + }, + { + "id": "wall_2", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 200, + "y": 80, + "width": 80, + "height": 40 + }, + { + "x": 240, + "y": 120, + "width": 80, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 70 + }, + { + "length": 110 + }, + { + "length": 90 + }, + { + "length": 90 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -70 + }, + { + "joint": 2, + "angle": 95 + }, + { + "joint": 3, + "angle": 35 + }, + { + "joint": 4, + "angle": 70 + }, + { + "joint": 5, + "angle": -145 + } + ] + }, + "legacy_answer": [ + -70, + 95, + 35, + 70, + -145 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-558\n- segment_count: 5\n- arm_base: (120.0, 40.0)\n- target: (197.9, 191.32)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=70\n- joint 2: length=110\n- joint 3: length=90\n- joint 4: length=90\n- joint 5: length=50\n- obstacles:\n- wall_1: type=block, pattern=warning_stripes\n part 1: x=80, y=120, width=80, height=80\n- wall_2: type=stair, pattern=warning_stripes\n part 1: x=200, y=80, width=80, height=40\n part 2: x=240, y=120, width=80, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-559.json b/lamp/data/lamp-559.json new file mode 100644 index 0000000000000000000000000000000000000000..37e473f87eaff1c15b7012fee9bb3a395343f9cf --- /dev/null +++ b/lamp/data/lamp-559.json @@ -0,0 +1,100 @@ +{ + "id": "lamp-559", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 80, + "y": -40 + }, + "target": { + "x": -66.68, + "y": -10.61 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": -40, + "y": 40, + "width": 80, + "height": 40 + }, + { + "x": 0, + "y": 80, + "width": 80, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 0, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 110 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 155 + }, + { + "joint": 2, + "angle": -160 + } + ] + }, + "legacy_answer": [ + 155, + -160 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-559\n- segment_count: 2\n- arm_base: (80.0, -40.0)\n- target: (-66.68, -10.61)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=110\n- joint 2: length=50\n- obstacles:\n- wall_1: type=stair, pattern=warning_stripes\n part 1: x=-40, y=40, width=80, height=40\n part 2: x=0, y=80, width=80, height=40\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=0, y=0, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-560.json b/lamp/data/lamp-560.json new file mode 100644 index 0000000000000000000000000000000000000000..059e46a9aa8a8491a623a76527c565f670beec63 --- /dev/null +++ b/lamp/data/lamp-560.json @@ -0,0 +1,109 @@ +{ + "id": "lamp-560", + "difficulty": 3, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 120, + "y": 120 + }, + "target": { + "x": 59.02, + "y": 196.03 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_vertical", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 80, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 40, + "width": 80, + "height": 40 + }, + { + "x": 40, + "y": 40, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 3, + "segments": [ + { + "length": 50 + }, + { + "length": 110 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 15 + }, + { + "joint": 2, + "angle": 95 + }, + { + "joint": 3, + "angle": -155 + } + ] + }, + "legacy_answer": [ + 15, + 95, + -155 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-560\n- segment_count: 3\n- arm_base: (120.0, 120.0)\n- target: (59.02, 196.03)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=110\n- joint 3: length=110\n- obstacles:\n- wall_1: type=bar_vertical, pattern=warning_stripes\n part 1: x=0, y=80, width=40, height=120\n- wall_2: type=l_corner, pattern=warning_stripes\n part 1: x=40, y=40, width=80, height=40\n part 2: x=40, y=40, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-561.json b/lamp/data/lamp-561.json new file mode 100644 index 0000000000000000000000000000000000000000..9ea0b25332404ff05b31c8a59defde2967028d61 --- /dev/null +++ b/lamp/data/lamp-561.json @@ -0,0 +1,99 @@ +{ + "id": "lamp-561", + "difficulty": 4, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 80, + "y": 120 + }, + "target": { + "x": 279.28, + "y": -9.6 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 200, + "y": 40, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 4, + "segments": [ + { + "length": 50 + }, + { + "length": 70 + }, + { + "length": 50 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -35 + }, + { + "joint": 2, + "angle": -70 + }, + { + "joint": 3, + "angle": -5 + }, + { + "joint": 4, + "angle": -20 + } + ] + }, + "legacy_answer": [ + -35, + -70, + -5, + -20 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-561\n- segment_count: 4\n- arm_base: (80.0, 120.0)\n- target: (279.28, -9.6)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=70\n- joint 3: length=50\n- joint 4: length=90\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=200, y=40, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-562.json b/lamp/data/lamp-562.json new file mode 100644 index 0000000000000000000000000000000000000000..c14cc8baf60c05c029854672c2d9a79e7abdd8dc --- /dev/null +++ b/lamp/data/lamp-562.json @@ -0,0 +1,118 @@ +{ + "id": "lamp-562", + "difficulty": 4, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 0, + "y": 0 + }, + "target": { + "x": 87.58, + "y": 215.76 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 80, + "width": 80, + "height": 40 + }, + { + "x": 80, + "y": 120, + "width": 80, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": 160, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 4, + "segments": [ + { + "length": 90 + }, + { + "length": 110 + }, + { + "length": 110 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -35 + }, + { + "joint": 2, + "angle": 125 + }, + { + "joint": 3, + "angle": 80 + }, + { + "joint": 4, + "angle": 50 + } + ] + }, + "legacy_answer": [ + -35, + 125, + 80, + 50 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-562\n- segment_count: 4\n- arm_base: (0.0, 0.0)\n- target: (87.58, 215.76)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=110\n- joint 3: length=110\n- joint 4: length=90\n- obstacles:\n- wall_1: type=stair, pattern=warning_stripes\n part 1: x=40, y=80, width=80, height=40\n part 2: x=80, y=120, width=80, height=40\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=80, y=160, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-563.json b/lamp/data/lamp-563.json new file mode 100644 index 0000000000000000000000000000000000000000..8460ed56b9ba20de18ba44a66c20e746e582465a --- /dev/null +++ b/lamp/data/lamp-563.json @@ -0,0 +1,100 @@ +{ + "id": "lamp-563", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 80, + "y": 80 + }, + "target": { + "x": 8.47, + "y": 142.61 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 120, + "width": 80, + "height": 40 + }, + { + "x": 40, + "y": 120, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "bar_vertical", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": -40, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 90 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 170 + }, + { + "joint": 2, + "angle": 70 + } + ] + }, + "legacy_answer": [ + 170, + 70 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-563\n- segment_count: 2\n- arm_base: (80.0, 80.0)\n- target: (8.47, 142.61)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=50\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=40, y=120, width=80, height=40\n part 2: x=40, y=120, width=40, height=120\n- wall_2: type=bar_vertical, pattern=warning_stripes\n part 1: x=0, y=-40, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-564.json b/lamp/data/lamp-564.json new file mode 100644 index 0000000000000000000000000000000000000000..46e3e186feaa67b418c9a01e1026b6330ed18db0 --- /dev/null +++ b/lamp/data/lamp-564.json @@ -0,0 +1,99 @@ +{ + "id": "lamp-564", + "difficulty": 4, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 0, + "y": 40 + }, + "target": { + "x": 75.48, + "y": 199.16 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": -40, + "y": 120, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 4, + "segments": [ + { + "length": 70 + }, + { + "length": 110 + }, + { + "length": 110 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 175 + }, + { + "joint": 2, + "angle": 20 + }, + { + "joint": 3, + "angle": 25 + }, + { + "joint": 4, + "angle": 130 + } + ] + }, + "legacy_answer": [ + 175, + 20, + 25, + 130 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-564\n- segment_count: 4\n- arm_base: (0.0, 40.0)\n- target: (75.48, 199.16)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=70\n- joint 2: length=110\n- joint 3: length=110\n- joint 4: length=90\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=-40, y=120, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-565.json b/lamp/data/lamp-565.json new file mode 100644 index 0000000000000000000000000000000000000000..a9ba07906cbbd348e8ce30ffa713966cbb31530b --- /dev/null +++ b/lamp/data/lamp-565.json @@ -0,0 +1,99 @@ +{ + "id": "lamp-565", + "difficulty": 4, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 80, + "y": 80 + }, + "target": { + "x": 93.45, + "y": -30.67 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": 0, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 4, + "segments": [ + { + "length": 90 + }, + { + "length": 110 + }, + { + "length": 70 + }, + { + "length": 70 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -120 + }, + { + "joint": 2, + "angle": -80 + }, + { + "joint": 3, + "angle": 115 + }, + { + "joint": 4, + "angle": 10 + } + ] + }, + "legacy_answer": [ + -120, + -80, + 115, + 10 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-565\n- segment_count: 4\n- arm_base: (80.0, 80.0)\n- target: (93.45, -30.67)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=110\n- joint 3: length=70\n- joint 4: length=70\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=80, y=0, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-566.json b/lamp/data/lamp-566.json new file mode 100644 index 0000000000000000000000000000000000000000..ea154bd13669232eeafd5e7317dc536cea9d346f --- /dev/null +++ b/lamp/data/lamp-566.json @@ -0,0 +1,109 @@ +{ + "id": "lamp-566", + "difficulty": 3, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 80, + "y": 80 + }, + "target": { + "x": 168.99, + "y": 325.53 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 200, + "width": 80, + "height": 40 + }, + { + "x": 80, + "y": 240, + "width": 80, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 280, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 3, + "segments": [ + { + "length": 90 + }, + { + "length": 90 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 75 + }, + { + "joint": 2, + "angle": 50 + }, + { + "joint": 3, + "angle": 85 + } + ] + }, + "legacy_answer": [ + 75, + 50, + 85 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-566\n- segment_count: 3\n- arm_base: (80.0, 80.0)\n- target: (168.99, 325.53)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=90\n- joint 3: length=90\n- obstacles:\n- wall_1: type=stair, pattern=warning_stripes\n part 1: x=40, y=200, width=80, height=40\n part 2: x=80, y=240, width=80, height=40\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=40, y=280, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-567.json b/lamp/data/lamp-567.json new file mode 100644 index 0000000000000000000000000000000000000000..4682c44ef6effd99676e1aef36dc85dfb097642c --- /dev/null +++ b/lamp/data/lamp-567.json @@ -0,0 +1,81 @@ +{ + "id": "lamp-567", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": -40, + "y": 40 + }, + "target": { + "x": 101.73, + "y": 176.82 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "block", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": 80, + "width": 80, + "height": 80 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 90 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 55 + }, + { + "joint": 2, + "angle": 35 + } + ] + }, + "legacy_answer": [ + 55, + 35 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-567\n- segment_count: 2\n- arm_base: (-40.0, 40.0)\n- target: (101.73, 176.82)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=110\n- obstacles:\n- wall_1: type=block, pattern=warning_stripes\n part 1: x=80, y=80, width=80, height=80\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-568.json b/lamp/data/lamp-568.json new file mode 100644 index 0000000000000000000000000000000000000000..9121cdeeee91e7692db57ac6762b5b93cab8df5e --- /dev/null +++ b/lamp/data/lamp-568.json @@ -0,0 +1,96 @@ +{ + "id": "lamp-568", + "difficulty": 3, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 80, + "y": 0 + }, + "target": { + "x": 102.32, + "y": 152.79 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 40, + "width": 80, + "height": 40 + }, + { + "x": 40, + "y": 40, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 3, + "segments": [ + { + "length": 90 + }, + { + "length": 110 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -25 + }, + { + "joint": 2, + "angle": 105 + }, + { + "joint": 3, + "angle": 110 + } + ] + }, + "legacy_answer": [ + -25, + 105, + 110 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-568\n- segment_count: 3\n- arm_base: (80.0, 0.0)\n- target: (102.32, 152.79)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=110\n- joint 3: length=90\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=40, y=40, width=80, height=40\n part 2: x=40, y=40, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-569.json b/lamp/data/lamp-569.json new file mode 100644 index 0000000000000000000000000000000000000000..c19b56ec04f66c28af054660b4f42d327d09f8d0 --- /dev/null +++ b/lamp/data/lamp-569.json @@ -0,0 +1,118 @@ +{ + "id": "lamp-569", + "difficulty": 4, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 40, + "y": 40 + }, + "target": { + "x": 125.7, + "y": -23.42 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 80, + "width": 80, + "height": 40 + }, + { + "x": 80, + "y": 120, + "width": 80, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 120, + "y": -80, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 4, + "segments": [ + { + "length": 90 + }, + { + "length": 110 + }, + { + "length": 70 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -180 + }, + { + "joint": 2, + "angle": -45 + }, + { + "joint": 3, + "angle": -20 + }, + { + "joint": 4, + "angle": 50 + } + ] + }, + "legacy_answer": [ + -180, + -45, + -20, + 50 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-569\n- segment_count: 4\n- arm_base: (40.0, 40.0)\n- target: (125.7, -23.42)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=110\n- joint 3: length=70\n- joint 4: length=50\n- obstacles:\n- wall_1: type=stair, pattern=warning_stripes\n part 1: x=40, y=80, width=80, height=40\n part 2: x=80, y=120, width=80, height=40\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=120, y=-80, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-570.json b/lamp/data/lamp-570.json new file mode 100644 index 0000000000000000000000000000000000000000..5738f3e4b049285c62e36a8641cb19d90c932656 --- /dev/null +++ b/lamp/data/lamp-570.json @@ -0,0 +1,112 @@ +{ + "id": "lamp-570", + "difficulty": 4, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 40, + "y": 120 + }, + "target": { + "x": 229.14, + "y": 127.69 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 40, + "width": 120, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "block", + "pattern": "warning_stripes", + "parts": [ + { + "x": 160, + "y": 0, + "width": 80, + "height": 80 + } + ] + } + ], + "arm": { + "segmentCount": 4, + "segments": [ + { + "length": 50 + }, + { + "length": 90 + }, + { + "length": 90 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -100 + }, + { + "joint": 2, + "angle": 80 + }, + { + "joint": 3, + "angle": 15 + }, + { + "joint": 4, + "angle": -30 + } + ] + }, + "legacy_answer": [ + -100, + 80, + 15, + -30 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-570\n- segment_count: 4\n- arm_base: (40.0, 120.0)\n- target: (229.14, 127.69)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=90\n- joint 3: length=90\n- joint 4: length=110\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=40, y=40, width=120, height=40\n- wall_2: type=block, pattern=warning_stripes\n part 1: x=160, y=0, width=80, height=80\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-571.json b/lamp/data/lamp-571.json new file mode 100644 index 0000000000000000000000000000000000000000..7e02bac0a750dd3ef51371c0477b86853aaaf9ce --- /dev/null +++ b/lamp/data/lamp-571.json @@ -0,0 +1,99 @@ +{ + "id": "lamp-571", + "difficulty": 4, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 120, + "y": 80 + }, + "target": { + "x": 120.07, + "y": -9.25 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 0, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 4, + "segments": [ + { + "length": 110 + }, + { + "length": 90 + }, + { + "length": 70 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -20 + }, + { + "joint": 2, + "angle": -120 + }, + { + "joint": 3, + "angle": -120 + }, + { + "joint": 4, + "angle": 105 + } + ] + }, + "legacy_answer": [ + -20, + -120, + -120, + 105 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-571\n- segment_count: 4\n- arm_base: (120.0, 80.0)\n- target: (120.07, -9.25)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=110\n- joint 2: length=90\n- joint 3: length=70\n- joint 4: length=90\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=40, y=0, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-572.json b/lamp/data/lamp-572.json new file mode 100644 index 0000000000000000000000000000000000000000..bcacf2b6053152173d774e14a0d72517ea95b3ca --- /dev/null +++ b/lamp/data/lamp-572.json @@ -0,0 +1,127 @@ +{ + "id": "lamp-572", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 40, + "y": 40 + }, + "target": { + "x": 220.42, + "y": 67.29 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 80, + "width": 80, + "height": 40 + }, + { + "x": 40, + "y": 80, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 120, + "y": -40, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 70 + }, + { + "length": 110 + }, + { + "length": 110 + }, + { + "length": 90 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -5 + }, + { + "joint": 2, + "angle": 5 + }, + { + "joint": 3, + "angle": 95 + }, + { + "joint": 4, + "angle": -160 + }, + { + "joint": 5, + "angle": -30 + } + ] + }, + "legacy_answer": [ + -5, + 5, + 95, + -160, + -30 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-572\n- segment_count: 5\n- arm_base: (40.0, 40.0)\n- target: (220.42, 67.29)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=70\n- joint 2: length=110\n- joint 3: length=110\n- joint 4: length=90\n- joint 5: length=110\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=40, y=80, width=80, height=40\n part 2: x=40, y=80, width=40, height=120\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=120, y=-40, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-573.json b/lamp/data/lamp-573.json new file mode 100644 index 0000000000000000000000000000000000000000..4545871f4064faaf88404f139ff86410d65a2f0c --- /dev/null +++ b/lamp/data/lamp-573.json @@ -0,0 +1,109 @@ +{ + "id": "lamp-573", + "difficulty": 3, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 120, + "y": 0 + }, + "target": { + "x": 198.86, + "y": -25.78 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 120, + "y": 40, + "width": 80, + "height": 40 + }, + { + "x": 120, + "y": 40, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": -80, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 3, + "segments": [ + { + "length": 50 + }, + { + "length": 50 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -10 + }, + { + "joint": 2, + "angle": -100 + }, + { + "joint": 3, + "angle": 40 + } + ] + }, + "legacy_answer": [ + -10, + -100, + 40 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-573\n- segment_count: 3\n- arm_base: (120.0, 0.0)\n- target: (198.86, -25.78)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=50\n- joint 3: length=50\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=120, y=40, width=80, height=40\n part 2: x=120, y=40, width=40, height=120\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=40, y=-80, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-574.json b/lamp/data/lamp-574.json new file mode 100644 index 0000000000000000000000000000000000000000..3bd0af984cd71cc004c24607f56c738758cb299c --- /dev/null +++ b/lamp/data/lamp-574.json @@ -0,0 +1,127 @@ +{ + "id": "lamp-574", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 40, + "y": 120 + }, + "target": { + "x": 137.62, + "y": 124.07 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 40, + "width": 120, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": -40, + "y": 160, + "width": 80, + "height": 40 + }, + { + "x": -40, + "y": 160, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 50 + }, + { + "length": 70 + }, + { + "length": 50 + }, + { + "length": 50 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 55 + }, + { + "joint": 2, + "angle": 15 + }, + { + "joint": 3, + "angle": 15 + }, + { + "joint": 4, + "angle": -15 + }, + { + "joint": 5, + "angle": -150 + } + ] + }, + "legacy_answer": [ + 55, + 15, + 15, + -15, + -150 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-574\n- segment_count: 5\n- arm_base: (40.0, 120.0)\n- target: (137.62, 124.07)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=70\n- joint 3: length=50\n- joint 4: length=50\n- joint 5: length=110\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=40, y=40, width=120, height=40\n- wall_2: type=l_corner, pattern=warning_stripes\n part 1: x=-40, y=160, width=80, height=40\n part 2: x=-40, y=160, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-575.json b/lamp/data/lamp-575.json new file mode 100644 index 0000000000000000000000000000000000000000..fc69bcd09536d3dd1f94ef8e29271018cf370372 --- /dev/null +++ b/lamp/data/lamp-575.json @@ -0,0 +1,109 @@ +{ + "id": "lamp-575", + "difficulty": 3, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 40, + "y": 40 + }, + "target": { + "x": -0.04, + "y": -8.74 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 80, + "width": 80, + "height": 40 + }, + { + "x": 40, + "y": 80, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "bar_vertical", + "pattern": "warning_stripes", + "parts": [ + { + "x": -80, + "y": 0, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 3, + "segments": [ + { + "length": 70 + }, + { + "length": 90 + }, + { + "length": 70 + } + ], + "initialAngles": [ + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 95 + }, + { + "joint": 2, + "angle": -140 + }, + { + "joint": 3, + "angle": -60 + } + ] + }, + "legacy_answer": [ + 95, + -140, + -60 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-575\n- segment_count: 3\n- arm_base: (40.0, 40.0)\n- target: (-0.04, -8.74)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=70\n- joint 2: length=90\n- joint 3: length=70\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=40, y=80, width=80, height=40\n part 2: x=40, y=80, width=40, height=120\n- wall_2: type=bar_vertical, pattern=warning_stripes\n part 1: x=-80, y=0, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-576.json b/lamp/data/lamp-576.json new file mode 100644 index 0000000000000000000000000000000000000000..8c54607873fd992a9d20415b9cef102251ce7929 --- /dev/null +++ b/lamp/data/lamp-576.json @@ -0,0 +1,127 @@ +{ + "id": "lamp-576", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 120, + "y": 80 + }, + "target": { + "x": 112.18, + "y": 254.68 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_vertical", + "pattern": "warning_stripes", + "parts": [ + { + "x": 160, + "y": 120, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 120, + "width": 80, + "height": 40 + }, + { + "x": 0, + "y": 120, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 50 + }, + { + "length": 50 + }, + { + "length": 50 + }, + { + "length": 110 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 55 + }, + { + "joint": 2, + "angle": -50 + }, + { + "joint": 3, + "angle": 120 + }, + { + "joint": 4, + "angle": 150 + }, + { + "joint": 5, + "angle": 55 + } + ] + }, + "legacy_answer": [ + 55, + -50, + 120, + 150, + 55 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-576\n- segment_count: 5\n- arm_base: (120.0, 80.0)\n- target: (112.18, 254.68)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=50\n- joint 3: length=50\n- joint 4: length=110\n- joint 5: length=90\n- obstacles:\n- wall_1: type=bar_vertical, pattern=warning_stripes\n part 1: x=160, y=120, width=40, height=120\n- wall_2: type=l_corner, pattern=warning_stripes\n part 1: x=0, y=120, width=80, height=40\n part 2: x=0, y=120, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-577.json b/lamp/data/lamp-577.json new file mode 100644 index 0000000000000000000000000000000000000000..6a050621b39ed3f500988398756d35d974566e68 --- /dev/null +++ b/lamp/data/lamp-577.json @@ -0,0 +1,109 @@ +{ + "id": "lamp-577", + "difficulty": 3, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 40, + "y": 80 + }, + "target": { + "x": 169.27, + "y": 102.14 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 120, + "width": 80, + "height": 40 + }, + { + "x": 40, + "y": 120, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 0, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 3, + "segments": [ + { + "length": 90 + }, + { + "length": 70 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 25 + }, + { + "joint": 2, + "angle": -150 + }, + { + "joint": 3, + "angle": 10 + } + ] + }, + "legacy_answer": [ + 25, + -150, + 10 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-577\n- segment_count: 3\n- arm_base: (40.0, 80.0)\n- target: (169.27, 102.14)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=70\n- joint 3: length=110\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=40, y=120, width=80, height=40\n part 2: x=40, y=120, width=40, height=120\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=40, y=0, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-578.json b/lamp/data/lamp-578.json new file mode 100644 index 0000000000000000000000000000000000000000..caf8df4cdde1bf7dde988ba34c1883faf1bec86b --- /dev/null +++ b/lamp/data/lamp-578.json @@ -0,0 +1,100 @@ +{ + "id": "lamp-578", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 120, + "y": 0 + }, + "target": { + "x": 7.32, + "y": -38.27 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 0, + "width": 80, + "height": 40 + }, + { + "x": 40, + "y": 40, + "width": 80, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "bar_vertical", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 40, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 50 + }, + { + "length": 70 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -170 + }, + { + "joint": 2, + "angle": -155 + } + ] + }, + "legacy_answer": [ + -170, + -155 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-578\n- segment_count: 2\n- arm_base: (120.0, 0.0)\n- target: (7.32, -38.27)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=70\n- obstacles:\n- wall_1: type=stair, pattern=warning_stripes\n part 1: x=0, y=0, width=80, height=40\n part 2: x=40, y=40, width=80, height=40\n- wall_2: type=bar_vertical, pattern=warning_stripes\n part 1: x=0, y=40, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-579.json b/lamp/data/lamp-579.json new file mode 100644 index 0000000000000000000000000000000000000000..d5385fe14c02cfe5f6a9916db7e24b817db92502 --- /dev/null +++ b/lamp/data/lamp-579.json @@ -0,0 +1,100 @@ +{ + "id": "lamp-579", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 80, + "y": 80 + }, + "target": { + "x": 192.03, + "y": 60.52 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": 120, + "width": 80, + "height": 40 + }, + { + "x": 120, + "y": 160, + "width": 80, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": 0, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 50 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 40 + }, + { + "joint": 2, + "angle": -35 + } + ] + }, + "legacy_answer": [ + 40, + -35 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-579\n- segment_count: 2\n- arm_base: (80.0, 80.0)\n- target: (192.03, 60.52)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=90\n- obstacles:\n- wall_1: type=stair, pattern=warning_stripes\n part 1: x=80, y=120, width=80, height=40\n part 2: x=120, y=160, width=80, height=40\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=80, y=0, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-580.json b/lamp/data/lamp-580.json new file mode 100644 index 0000000000000000000000000000000000000000..bd070fe5ed4cded43f33ac5f0eb2fdb754e86854 --- /dev/null +++ b/lamp/data/lamp-580.json @@ -0,0 +1,96 @@ +{ + "id": "lamp-580", + "difficulty": 3, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": -40, + "y": 80 + }, + "target": { + "x": 131.4, + "y": -42.25 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": -40, + "width": 80, + "height": 40 + }, + { + "x": 120, + "y": 0, + "width": 80, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 3, + "segments": [ + { + "length": 50 + }, + { + "length": 110 + }, + { + "length": 70 + } + ], + "initialAngles": [ + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -40 + }, + { + "joint": 2, + "angle": -55 + }, + { + "joint": 3, + "angle": 0 + } + ] + }, + "legacy_answer": [ + -40, + -55, + 0 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-580\n- segment_count: 3\n- arm_base: (-40.0, 80.0)\n- target: (131.4, -42.25)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=110\n- joint 3: length=70\n- obstacles:\n- wall_1: type=stair, pattern=warning_stripes\n part 1: x=80, y=-40, width=80, height=40\n part 2: x=120, y=0, width=80, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-581.json b/lamp/data/lamp-581.json new file mode 100644 index 0000000000000000000000000000000000000000..8a0d90c278e8ff76e38c610468a025fd4cee1caa --- /dev/null +++ b/lamp/data/lamp-581.json @@ -0,0 +1,108 @@ +{ + "id": "lamp-581", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 120, + "y": 120 + }, + "target": { + "x": 112.91, + "y": 270.56 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": 200, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 110 + }, + { + "length": 70 + }, + { + "length": 50 + }, + { + "length": 70 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 125 + }, + { + "joint": 2, + "angle": 150 + }, + { + "joint": 3, + "angle": 105 + }, + { + "joint": 4, + "angle": -50 + }, + { + "joint": 5, + "angle": 20 + } + ] + }, + "legacy_answer": [ + 125, + 150, + 105, + -50, + 20 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-581\n- segment_count: 5\n- arm_base: (120.0, 120.0)\n- target: (112.91, 270.56)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=110\n- joint 2: length=70\n- joint 3: length=50\n- joint 4: length=70\n- joint 5: length=90\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=80, y=200, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-582.json b/lamp/data/lamp-582.json new file mode 100644 index 0000000000000000000000000000000000000000..fdd4c395112f39bc4e68c5a1c2652c3292e4ec52 --- /dev/null +++ b/lamp/data/lamp-582.json @@ -0,0 +1,109 @@ +{ + "id": "lamp-582", + "difficulty": 3, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 40, + "y": 0 + }, + "target": { + "x": 48.42, + "y": 87.74 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_vertical", + "pattern": "warning_stripes", + "parts": [ + { + "x": -40, + "y": 0, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": 80, + "width": 80, + "height": 40 + }, + { + "x": 80, + "y": 80, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 3, + "segments": [ + { + "length": 90 + }, + { + "length": 50 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 90 + }, + { + "joint": 2, + "angle": 70 + }, + { + "joint": 3, + "angle": -100 + } + ] + }, + "legacy_answer": [ + 90, + 70, + -100 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-582\n- segment_count: 3\n- arm_base: (40.0, 0.0)\n- target: (48.42, 87.74)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=50\n- joint 3: length=50\n- obstacles:\n- wall_1: type=bar_vertical, pattern=warning_stripes\n part 1: x=-40, y=0, width=40, height=120\n- wall_2: type=l_corner, pattern=warning_stripes\n part 1: x=80, y=80, width=80, height=40\n part 2: x=80, y=80, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-583.json b/lamp/data/lamp-583.json new file mode 100644 index 0000000000000000000000000000000000000000..61f941064ea3f829cc8d36e5d2548d7d7526c21b --- /dev/null +++ b/lamp/data/lamp-583.json @@ -0,0 +1,108 @@ +{ + "id": "lamp-583", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 120, + "y": 40 + }, + "target": { + "x": 106.42, + "y": 237.04 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": 120, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 110 + }, + { + "length": 50 + }, + { + "length": 110 + }, + { + "length": 70 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 145 + }, + { + "joint": 2, + "angle": 50 + }, + { + "joint": 3, + "angle": 50 + }, + { + "joint": 4, + "angle": 120 + }, + { + "joint": 5, + "angle": -80 + } + ] + }, + "legacy_answer": [ + 145, + 50, + 50, + 120, + -80 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-583\n- segment_count: 5\n- arm_base: (120.0, 40.0)\n- target: (106.42, 237.04)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=110\n- joint 2: length=50\n- joint 3: length=110\n- joint 4: length=70\n- joint 5: length=50\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=80, y=120, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-584.json b/lamp/data/lamp-584.json new file mode 100644 index 0000000000000000000000000000000000000000..1116ce14675f59799663bb7f05024a974ffff783 --- /dev/null +++ b/lamp/data/lamp-584.json @@ -0,0 +1,105 @@ +{ + "id": "lamp-584", + "difficulty": 4, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 40, + "y": 0 + }, + "target": { + "x": 57.2, + "y": -71.69 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": 40, + "width": 80, + "height": 40 + }, + { + "x": 80, + "y": 40, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 4, + "segments": [ + { + "length": 50 + }, + { + "length": 50 + }, + { + "length": 70 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 45 + }, + { + "joint": 2, + "angle": 120 + }, + { + "joint": 3, + "angle": -110 + }, + { + "joint": 4, + "angle": -70 + } + ] + }, + "legacy_answer": [ + 45, + 120, + -110, + -70 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-584\n- segment_count: 4\n- arm_base: (40.0, 0.0)\n- target: (57.2, -71.69)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=50\n- joint 3: length=70\n- joint 4: length=90\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=80, y=40, width=80, height=40\n part 2: x=80, y=40, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-585.json b/lamp/data/lamp-585.json new file mode 100644 index 0000000000000000000000000000000000000000..7aa71396b039f234370fb1c64920f8f23a464360 --- /dev/null +++ b/lamp/data/lamp-585.json @@ -0,0 +1,100 @@ +{ + "id": "lamp-585", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 0, + "y": 120 + }, + "target": { + "x": 138.4, + "y": 162.78 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 40, + "width": 120, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 200, + "width": 80, + "height": 40 + }, + { + "x": 0, + "y": 200, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 110 + }, + { + "length": 70 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 45 + }, + { + "joint": 2, + "angle": -30 + } + ] + }, + "legacy_answer": [ + 45, + -30 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-585\n- segment_count: 2\n- arm_base: (0.0, 120.0)\n- target: (138.4, 162.78)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=110\n- joint 2: length=70\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=0, y=40, width=120, height=40\n- wall_2: type=l_corner, pattern=warning_stripes\n part 1: x=0, y=200, width=80, height=40\n part 2: x=0, y=200, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-586.json b/lamp/data/lamp-586.json new file mode 100644 index 0000000000000000000000000000000000000000..5f647ee5ab3ed2a04873988d1e1e3dba93bfbc1c --- /dev/null +++ b/lamp/data/lamp-586.json @@ -0,0 +1,105 @@ +{ + "id": "lamp-586", + "difficulty": 4, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 120, + "y": 0 + }, + "target": { + "x": 199.66, + "y": 135.07 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 160, + "y": 40, + "width": 80, + "height": 40 + }, + { + "x": 200, + "y": 80, + "width": 80, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 4, + "segments": [ + { + "length": 50 + }, + { + "length": 70 + }, + { + "length": 70 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 120 + }, + { + "joint": 2, + "angle": 105 + }, + { + "joint": 3, + "angle": -50 + }, + { + "joint": 4, + "angle": 45 + } + ] + }, + "legacy_answer": [ + 120, + 105, + -50, + 45 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-586\n- segment_count: 4\n- arm_base: (120.0, 0.0)\n- target: (199.66, 135.07)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=70\n- joint 3: length=70\n- joint 4: length=110\n- obstacles:\n- wall_1: type=stair, pattern=warning_stripes\n part 1: x=160, y=40, width=80, height=40\n part 2: x=200, y=80, width=80, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-587.json b/lamp/data/lamp-587.json new file mode 100644 index 0000000000000000000000000000000000000000..708076d8164d354282b0e2ed34b23ead74792f38 --- /dev/null +++ b/lamp/data/lamp-587.json @@ -0,0 +1,127 @@ +{ + "id": "lamp-587", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 80, + "y": 40 + }, + "target": { + "x": 151.83, + "y": 115.94 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 160, + "y": 80, + "width": 80, + "height": 40 + }, + { + "x": 160, + "y": 80, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "bar_vertical", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 80, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 110 + }, + { + "length": 50 + }, + { + "length": 50 + }, + { + "length": 70 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 85 + }, + { + "joint": 2, + "angle": 65 + }, + { + "joint": 3, + "angle": -115 + }, + { + "joint": 4, + "angle": -70 + }, + { + "joint": 5, + "angle": 40 + } + ] + }, + "legacy_answer": [ + 85, + 65, + -115, + -70, + 40 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-587\n- segment_count: 5\n- arm_base: (80.0, 40.0)\n- target: (151.83, 115.94)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=110\n- joint 2: length=50\n- joint 3: length=50\n- joint 4: length=70\n- joint 5: length=50\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=160, y=80, width=80, height=40\n part 2: x=160, y=80, width=40, height=120\n- wall_2: type=bar_vertical, pattern=warning_stripes\n part 1: x=40, y=80, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-588.json b/lamp/data/lamp-588.json new file mode 100644 index 0000000000000000000000000000000000000000..a9b1bcb8cbba1180499fc904e3b5ba12f71db1c7 --- /dev/null +++ b/lamp/data/lamp-588.json @@ -0,0 +1,124 @@ +{ + "id": "lamp-588", + "difficulty": 4, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 0, + "y": 80 + }, + "target": { + "x": -5.4, + "y": 146.36 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 120, + "width": 80, + "height": 40 + }, + { + "x": 80, + "y": 160, + "width": 80, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 160, + "width": 80, + "height": 40 + }, + { + "x": 0, + "y": 160, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 4, + "segments": [ + { + "length": 50 + }, + { + "length": 70 + }, + { + "length": 110 + }, + { + "length": 70 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -85 + }, + { + "joint": 2, + "angle": -45 + }, + { + "joint": 3, + "angle": 100 + }, + { + "joint": 4, + "angle": 125 + } + ] + }, + "legacy_answer": [ + -85, + -45, + 100, + 125 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-588\n- segment_count: 4\n- arm_base: (0.0, 80.0)\n- target: (-5.4, 146.36)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=70\n- joint 3: length=110\n- joint 4: length=70\n- obstacles:\n- wall_1: type=stair, pattern=warning_stripes\n part 1: x=40, y=120, width=80, height=40\n part 2: x=80, y=160, width=80, height=40\n- wall_2: type=l_corner, pattern=warning_stripes\n part 1: x=0, y=160, width=80, height=40\n part 2: x=0, y=160, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-589.json b/lamp/data/lamp-589.json new file mode 100644 index 0000000000000000000000000000000000000000..9c2f973ef9042e26dc0c08d01e29eb6edf877e4c --- /dev/null +++ b/lamp/data/lamp-589.json @@ -0,0 +1,127 @@ +{ + "id": "lamp-589", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": -40, + "y": -80 + }, + "target": { + "x": 53.98, + "y": -96.14 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": -40, + "y": -40, + "width": 120, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": -40, + "width": 80, + "height": 40 + }, + { + "x": 80, + "y": -40, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 90 + }, + { + "length": 70 + }, + { + "length": 110 + }, + { + "length": 50 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -60 + }, + { + "joint": 2, + "angle": 165 + }, + { + "joint": 3, + "angle": -5 + }, + { + "joint": 4, + "angle": 140 + }, + { + "joint": 5, + "angle": 25 + } + ] + }, + "legacy_answer": [ + -60, + 165, + -5, + 140, + 25 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-589\n- segment_count: 5\n- arm_base: (-40.0, -80.0)\n- target: (53.98, -96.14)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=70\n- joint 3: length=110\n- joint 4: length=50\n- joint 5: length=50\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=-40, y=-40, width=120, height=40\n- wall_2: type=l_corner, pattern=warning_stripes\n part 1: x=80, y=-40, width=80, height=40\n part 2: x=80, y=-40, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-590.json b/lamp/data/lamp-590.json new file mode 100644 index 0000000000000000000000000000000000000000..b57f9d6fc9ba56649d05e56d0dcd621577e20848 --- /dev/null +++ b/lamp/data/lamp-590.json @@ -0,0 +1,100 @@ +{ + "id": "lamp-590", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 40, + "y": 120 + }, + "target": { + "x": 48.44, + "y": 244.85 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_vertical", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 160, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": 200, + "width": 80, + "height": 40 + }, + { + "x": 80, + "y": 200, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 70 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 25 + }, + { + "joint": 2, + "angle": 120 + } + ] + }, + "legacy_answer": [ + 25, + 120 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-590\n- segment_count: 2\n- arm_base: (40.0, 120.0)\n- target: (48.44, 244.85)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=70\n- joint 2: length=110\n- obstacles:\n- wall_1: type=bar_vertical, pattern=warning_stripes\n part 1: x=0, y=160, width=40, height=120\n- wall_2: type=l_corner, pattern=warning_stripes\n part 1: x=80, y=200, width=80, height=40\n part 2: x=80, y=200, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-591.json b/lamp/data/lamp-591.json new file mode 100644 index 0000000000000000000000000000000000000000..bc4da7e66207bb6d3179445fd92b414cbf2708fb --- /dev/null +++ b/lamp/data/lamp-591.json @@ -0,0 +1,127 @@ +{ + "id": "lamp-591", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 40, + "y": 40 + }, + "target": { + "x": 100.74, + "y": 17.73 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": 80, + "width": 120, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": -40, + "y": 80, + "width": 80, + "height": 40 + }, + { + "x": 0, + "y": 120, + "width": 80, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 50 + }, + { + "length": 90 + }, + { + "length": 50 + }, + { + "length": 90 + }, + { + "length": 70 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 70 + }, + { + "joint": 2, + "angle": -130 + }, + { + "joint": 3, + "angle": -130 + }, + { + "joint": 4, + "angle": -10 + }, + { + "joint": 5, + "angle": 50 + } + ] + }, + "legacy_answer": [ + 70, + -130, + -130, + -10, + 50 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-591\n- segment_count: 5\n- arm_base: (40.0, 40.0)\n- target: (100.74, 17.73)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=90\n- joint 3: length=50\n- joint 4: length=90\n- joint 5: length=70\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=80, y=80, width=120, height=40\n- wall_2: type=stair, pattern=warning_stripes\n part 1: x=-40, y=80, width=80, height=40\n part 2: x=0, y=120, width=80, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-592.json b/lamp/data/lamp-592.json new file mode 100644 index 0000000000000000000000000000000000000000..dfba50320cdddf59ab360e7210663a1e7a132df6 --- /dev/null +++ b/lamp/data/lamp-592.json @@ -0,0 +1,109 @@ +{ + "id": "lamp-592", + "difficulty": 3, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 40, + "y": 120 + }, + "target": { + "x": 31.76, + "y": -57.1 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_vertical", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": -40, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": 0, + "width": 80, + "height": 40 + }, + { + "x": 120, + "y": 40, + "width": 80, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 3, + "segments": [ + { + "length": 110 + }, + { + "length": 70 + }, + { + "length": 70 + } + ], + "initialAngles": [ + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -135 + }, + { + "joint": 2, + "angle": -25 + }, + { + "joint": 3, + "angle": -85 + } + ] + }, + "legacy_answer": [ + -135, + -25, + -85 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-592\n- segment_count: 3\n- arm_base: (40.0, 120.0)\n- target: (31.76, -57.1)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=110\n- joint 2: length=70\n- joint 3: length=70\n- obstacles:\n- wall_1: type=bar_vertical, pattern=warning_stripes\n part 1: x=40, y=-40, width=40, height=120\n- wall_2: type=stair, pattern=warning_stripes\n part 1: x=80, y=0, width=80, height=40\n part 2: x=120, y=40, width=80, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-593.json b/lamp/data/lamp-593.json new file mode 100644 index 0000000000000000000000000000000000000000..d1acf70e1f7ba4a0594072b067cc19dea5175f77 --- /dev/null +++ b/lamp/data/lamp-593.json @@ -0,0 +1,100 @@ +{ + "id": "lamp-593", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 40, + "y": 40 + }, + "target": { + "x": 98.65, + "y": -11.58 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": -80, + "width": 120, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 80, + "width": 80, + "height": 40 + }, + { + "x": 40, + "y": 80, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 50 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 45 + }, + { + "joint": 2, + "angle": -75 + } + ] + }, + "legacy_answer": [ + 45, + -75 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-593\n- segment_count: 2\n- arm_base: (40.0, 40.0)\n- target: (98.65, -11.58)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=90\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=0, y=-80, width=120, height=40\n- wall_2: type=l_corner, pattern=warning_stripes\n part 1: x=40, y=80, width=80, height=40\n part 2: x=40, y=80, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-594.json b/lamp/data/lamp-594.json new file mode 100644 index 0000000000000000000000000000000000000000..f49d033133672e1d3329ba48231e29de8f9ed4f1 --- /dev/null +++ b/lamp/data/lamp-594.json @@ -0,0 +1,109 @@ +{ + "id": "lamp-594", + "difficulty": 3, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 40, + "y": 80 + }, + "target": { + "x": -40.35, + "y": 112.06 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": -40, + "y": 120, + "width": 120, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": -40, + "y": 160, + "width": 80, + "height": 40 + }, + { + "x": -40, + "y": 160, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 3, + "segments": [ + { + "length": 110 + }, + { + "length": 50 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -180 + }, + { + "joint": 2, + "angle": -165 + }, + { + "joint": 3, + "angle": 30 + } + ] + }, + "legacy_answer": [ + -180, + -165, + 30 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-594\n- segment_count: 3\n- arm_base: (40.0, 80.0)\n- target: (-40.35, 112.06)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=110\n- joint 2: length=50\n- joint 3: length=90\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=-40, y=120, width=120, height=40\n- wall_2: type=l_corner, pattern=warning_stripes\n part 1: x=-40, y=160, width=80, height=40\n part 2: x=-40, y=160, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-595.json b/lamp/data/lamp-595.json new file mode 100644 index 0000000000000000000000000000000000000000..e88bbfdb578d14ba6a5a37a21e06f6bee92f53e1 --- /dev/null +++ b/lamp/data/lamp-595.json @@ -0,0 +1,127 @@ +{ + "id": "lamp-595", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 120, + "y": 40 + }, + "target": { + "x": 192.8, + "y": 266.09 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 120, + "y": 120, + "width": 80, + "height": 40 + }, + { + "x": 120, + "y": 120, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 120, + "y": 80, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 70 + }, + { + "length": 90 + }, + { + "length": 90 + }, + { + "length": 110 + }, + { + "length": 70 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 135 + }, + { + "joint": 2, + "angle": 120 + }, + { + "joint": 3, + "angle": 65 + }, + { + "joint": 4, + "angle": 40 + }, + { + "joint": 5, + "angle": -50 + } + ] + }, + "legacy_answer": [ + 135, + 120, + 65, + 40, + -50 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-595\n- segment_count: 5\n- arm_base: (120.0, 40.0)\n- target: (192.8, 266.09)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=70\n- joint 2: length=90\n- joint 3: length=90\n- joint 4: length=110\n- joint 5: length=70\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=120, y=120, width=80, height=40\n part 2: x=120, y=120, width=40, height=120\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=120, y=80, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-596.json b/lamp/data/lamp-596.json new file mode 100644 index 0000000000000000000000000000000000000000..9d8f3ab0a90afa7440bac3452be1581c8d9aaa95 --- /dev/null +++ b/lamp/data/lamp-596.json @@ -0,0 +1,127 @@ +{ + "id": "lamp-596", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": -40, + "y": 120 + }, + "target": { + "x": -52, + "y": 262.49 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": -40, + "y": 240, + "width": 80, + "height": 40 + }, + { + "x": -40, + "y": 240, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 160, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 110 + }, + { + "length": 50 + }, + { + "length": 70 + }, + { + "length": 70 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 65 + }, + { + "joint": 2, + "angle": 170 + }, + { + "joint": 3, + "angle": 130 + }, + { + "joint": 4, + "angle": 165 + }, + { + "joint": 5, + "angle": -20 + } + ] + }, + "legacy_answer": [ + 65, + 170, + 130, + 165, + -20 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-596\n- segment_count: 5\n- arm_base: (-40.0, 120.0)\n- target: (-52.0, 262.49)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=110\n- joint 2: length=50\n- joint 3: length=70\n- joint 4: length=70\n- joint 5: length=110\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=-40, y=240, width=80, height=40\n part 2: x=-40, y=240, width=40, height=120\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=0, y=160, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-597.json b/lamp/data/lamp-597.json new file mode 100644 index 0000000000000000000000000000000000000000..74fc5ebab91c2efd39ce7f95c62b890af03bc439 --- /dev/null +++ b/lamp/data/lamp-597.json @@ -0,0 +1,94 @@ +{ + "id": "lamp-597", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 0, + "y": 80 + }, + "target": { + "x": 15.33, + "y": 138.55 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "block", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 160, + "width": 80, + "height": 80 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 0, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 110 + }, + { + "length": 70 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 40 + }, + { + "joint": 2, + "angle": -170 + } + ] + }, + "legacy_answer": [ + 40, + -170 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-597\n- segment_count: 2\n- arm_base: (0.0, 80.0)\n- target: (15.33, 138.55)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=110\n- joint 2: length=70\n- obstacles:\n- wall_1: type=block, pattern=warning_stripes\n part 1: x=0, y=160, width=80, height=80\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=0, y=0, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-598.json b/lamp/data/lamp-598.json new file mode 100644 index 0000000000000000000000000000000000000000..6ded508201d525afc5281958b5a90124676583aa --- /dev/null +++ b/lamp/data/lamp-598.json @@ -0,0 +1,124 @@ +{ + "id": "lamp-598", + "difficulty": 4, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 120, + "y": 0 + }, + "target": { + "x": -26.65, + "y": 6.6 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": -80, + "y": 40, + "width": 80, + "height": 40 + }, + { + "x": -40, + "y": 80, + "width": 80, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 120, + "y": 40, + "width": 80, + "height": 40 + }, + { + "x": 120, + "y": 40, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 4, + "segments": [ + { + "length": 50 + }, + { + "length": 110 + }, + { + "length": 70 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 140 + }, + { + "joint": 2, + "angle": 85 + }, + { + "joint": 3, + "angle": -125 + }, + { + "joint": 4, + "angle": -135 + } + ] + }, + "legacy_answer": [ + 140, + 85, + -125, + -135 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-598\n- segment_count: 4\n- arm_base: (120.0, 0.0)\n- target: (-26.65, 6.6)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=110\n- joint 3: length=70\n- joint 4: length=110\n- obstacles:\n- wall_1: type=stair, pattern=warning_stripes\n part 1: x=-80, y=40, width=80, height=40\n part 2: x=-40, y=80, width=80, height=40\n- wall_2: type=l_corner, pattern=warning_stripes\n part 1: x=120, y=40, width=80, height=40\n part 2: x=120, y=40, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-599.json b/lamp/data/lamp-599.json new file mode 100644 index 0000000000000000000000000000000000000000..1c5f0ba8b473be351014b6bfa7c5a12f2a0bac45 --- /dev/null +++ b/lamp/data/lamp-599.json @@ -0,0 +1,81 @@ +{ + "id": "lamp-599", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 0, + "y": 0 + }, + "target": { + "x": -117.84, + "y": 89.66 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_vertical", + "pattern": "warning_stripes", + "parts": [ + { + "x": -80, + "y": -40, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 90 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 95 + }, + { + "joint": 2, + "angle": -180 + } + ] + }, + "legacy_answer": [ + 95, + -180 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-599\n- segment_count: 2\n- arm_base: (0.0, 0.0)\n- target: (-117.84, 89.66)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=110\n- obstacles:\n- wall_1: type=bar_vertical, pattern=warning_stripes\n part 1: x=-80, y=-40, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-600.json b/lamp/data/lamp-600.json new file mode 100644 index 0000000000000000000000000000000000000000..e9a04f458a2dd37f4778c0edddb4993dc3193689 --- /dev/null +++ b/lamp/data/lamp-600.json @@ -0,0 +1,115 @@ +{ + "id": "lamp-600", + "difficulty": 3, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": -40, + "y": 40 + }, + "target": { + "x": -1.96, + "y": 167.26 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 80, + "width": 80, + "height": 40 + }, + { + "x": 0, + "y": 80, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 120, + "width": 80, + "height": 40 + }, + { + "x": 80, + "y": 160, + "width": 80, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 3, + "segments": [ + { + "length": 90 + }, + { + "length": 70 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 65 + }, + { + "joint": 2, + "angle": -170 + }, + { + "joint": 3, + "angle": 40 + } + ] + }, + "legacy_answer": [ + 65, + -170, + 40 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-600\n- segment_count: 3\n- arm_base: (-40.0, 40.0)\n- target: (-1.96, 167.26)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=70\n- joint 3: length=90\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=0, y=80, width=80, height=40\n part 2: x=0, y=80, width=40, height=120\n- wall_2: type=stair, pattern=warning_stripes\n part 1: x=40, y=120, width=80, height=40\n part 2: x=80, y=160, width=80, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-601.json b/lamp/data/lamp-601.json new file mode 100644 index 0000000000000000000000000000000000000000..75c25929854180314d059eb1a143da7435486eec --- /dev/null +++ b/lamp/data/lamp-601.json @@ -0,0 +1,100 @@ +{ + "id": "lamp-601", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 80, + "y": 0 + }, + "target": { + "x": 207.87, + "y": -55.78 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 120, + "y": 40, + "width": 80, + "height": 40 + }, + { + "x": 120, + "y": 40, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 40, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 50 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -30 + }, + { + "joint": 2, + "angle": -20 + } + ] + }, + "legacy_answer": [ + -30, + -20 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-601\n- segment_count: 2\n- arm_base: (80.0, 0.0)\n- target: (207.87, -55.78)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=90\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=120, y=40, width=80, height=40\n part 2: x=120, y=40, width=40, height=120\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=0, y=40, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-602.json b/lamp/data/lamp-602.json new file mode 100644 index 0000000000000000000000000000000000000000..7cdeef90cbf34ce8d440235bec008d2a84b03477 --- /dev/null +++ b/lamp/data/lamp-602.json @@ -0,0 +1,127 @@ +{ + "id": "lamp-602", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 80, + "y": 40 + }, + "target": { + "x": 14.95, + "y": 2.9 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "block", + "pattern": "warning_stripes", + "parts": [ + { + "x": -40, + "y": 40, + "width": 80, + "height": 80 + } + ] + }, + { + "id": "wall_2", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 80, + "width": 80, + "height": 40 + }, + { + "x": 40, + "y": 80, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 90 + }, + { + "length": 50 + }, + { + "length": 110 + }, + { + "length": 90 + }, + { + "length": 70 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -125 + }, + { + "joint": 2, + "angle": -130 + }, + { + "joint": 3, + "angle": 90 + }, + { + "joint": 4, + "angle": -110 + }, + { + "joint": 5, + "angle": 45 + } + ] + }, + "legacy_answer": [ + -125, + -130, + 90, + -110, + 45 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-602\n- segment_count: 5\n- arm_base: (80.0, 40.0)\n- target: (14.95, 2.9)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=90\n- joint 2: length=50\n- joint 3: length=110\n- joint 4: length=90\n- joint 5: length=70\n- obstacles:\n- wall_1: type=block, pattern=warning_stripes\n part 1: x=-40, y=40, width=80, height=80\n- wall_2: type=l_corner, pattern=warning_stripes\n part 1: x=40, y=80, width=80, height=40\n part 2: x=40, y=80, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-603.json b/lamp/data/lamp-603.json new file mode 100644 index 0000000000000000000000000000000000000000..b4fc8418284704b11bc326bbecbd05105cb34758 --- /dev/null +++ b/lamp/data/lamp-603.json @@ -0,0 +1,118 @@ +{ + "id": "lamp-603", + "difficulty": 4, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 40, + "y": 120 + }, + "target": { + "x": 197.79, + "y": 281.01 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 200, + "width": 80, + "height": 40 + }, + { + "x": 40, + "y": 240, + "width": 80, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 280, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 4, + "segments": [ + { + "length": 110 + }, + { + "length": 110 + }, + { + "length": 110 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 60 + }, + { + "joint": 2, + "angle": 40 + }, + { + "joint": 3, + "angle": -100 + }, + { + "joint": 4, + "angle": 70 + } + ] + }, + "legacy_answer": [ + 60, + 40, + -100, + 70 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-603\n- segment_count: 4\n- arm_base: (40.0, 120.0)\n- target: (197.79, 281.01)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=110\n- joint 2: length=110\n- joint 3: length=110\n- joint 4: length=110\n- obstacles:\n- wall_1: type=stair, pattern=warning_stripes\n part 1: x=0, y=200, width=80, height=40\n part 2: x=40, y=240, width=80, height=40\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=40, y=280, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-604.json b/lamp/data/lamp-604.json new file mode 100644 index 0000000000000000000000000000000000000000..94b8fa6337ba39a849fba6cbd3b35fb0282e14f5 --- /dev/null +++ b/lamp/data/lamp-604.json @@ -0,0 +1,115 @@ +{ + "id": "lamp-604", + "difficulty": 3, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 80, + "y": 120 + }, + "target": { + "x": -10.63, + "y": 191.41 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 200, + "width": 80, + "height": 40 + }, + { + "x": 0, + "y": 200, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "stair", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": 160, + "width": 80, + "height": 40 + }, + { + "x": 80, + "y": 200, + "width": 80, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 3, + "segments": [ + { + "length": 70 + }, + { + "length": 110 + }, + { + "length": 90 + } + ], + "initialAngles": [ + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -30 + }, + { + "joint": 2, + "angle": 165 + }, + { + "joint": 3, + "angle": 120 + } + ] + }, + "legacy_answer": [ + -30, + 165, + 120 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-604\n- segment_count: 3\n- arm_base: (80.0, 120.0)\n- target: (-10.63, 191.41)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=70\n- joint 2: length=110\n- joint 3: length=90\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=0, y=200, width=80, height=40\n part 2: x=0, y=200, width=40, height=120\n- wall_2: type=stair, pattern=warning_stripes\n part 1: x=40, y=160, width=80, height=40\n part 2: x=80, y=200, width=80, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-605.json b/lamp/data/lamp-605.json new file mode 100644 index 0000000000000000000000000000000000000000..8dd726c0581808f00c9805d1e8d921b17e18549b --- /dev/null +++ b/lamp/data/lamp-605.json @@ -0,0 +1,103 @@ +{ + "id": "lamp-605", + "difficulty": 3, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 80, + "y": 80 + }, + "target": { + "x": 231.64, + "y": 4.48 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "block", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": -40, + "width": 80, + "height": 80 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 160, + "y": -40, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 3, + "segments": [ + { + "length": 50 + }, + { + "length": 110 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 160 + }, + { + "joint": 2, + "angle": -30 + }, + { + "joint": 3, + "angle": -20 + } + ] + }, + "legacy_answer": [ + 160, + -30, + -20 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-605\n- segment_count: 3\n- arm_base: (80.0, 80.0)\n- target: (231.64, 4.48)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=110\n- joint 3: length=110\n- obstacles:\n- wall_1: type=block, pattern=warning_stripes\n part 1: x=40, y=-40, width=80, height=80\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=160, y=-40, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-606.json b/lamp/data/lamp-606.json new file mode 100644 index 0000000000000000000000000000000000000000..59303ebba71ada79f3d5ee92bc91fdf58a239426 --- /dev/null +++ b/lamp/data/lamp-606.json @@ -0,0 +1,100 @@ +{ + "id": "lamp-606", + "difficulty": 2, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 160, + "y": 480 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 80, + "y": 0 + }, + "target": { + "x": 125, + "y": -43.3 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": 40, + "width": 80, + "height": 40 + }, + { + "x": 80, + "y": 40, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "bar_vertical", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": -40, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 2, + "segments": [ + { + "length": 50 + }, + { + "length": 70 + } + ], + "initialAngles": [ + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -120 + }, + { + "joint": 2, + "angle": 0 + } + ] + }, + "legacy_answer": [ + -120, + 0 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-606\n- segment_count: 2\n- arm_base: (80.0, 0.0)\n- target: (125.0, -43.3)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=70\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=80, y=40, width=80, height=40\n part 2: x=80, y=40, width=40, height=120\n- wall_2: type=bar_vertical, pattern=warning_stripes\n part 1: x=0, y=-40, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-607.json b/lamp/data/lamp-607.json new file mode 100644 index 0000000000000000000000000000000000000000..b2468eff11975958a3437b8ef350ccb24c3b31ef --- /dev/null +++ b/lamp/data/lamp-607.json @@ -0,0 +1,127 @@ +{ + "id": "lamp-607", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 0, + "y": 40 + }, + "target": { + "x": 22.37, + "y": -46.71 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": 40, + "y": -40, + "width": 120, + "height": 40 + } + ] + }, + { + "id": "wall_2", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": -40, + "y": 80, + "width": 80, + "height": 40 + }, + { + "x": -40, + "y": 80, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 50 + }, + { + "length": 110 + }, + { + "length": 70 + }, + { + "length": 90 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -135 + }, + { + "joint": 2, + "angle": 165 + }, + { + "joint": 3, + "angle": 10 + }, + { + "joint": 4, + "angle": -30 + }, + { + "joint": 5, + "angle": -70 + } + ] + }, + "legacy_answer": [ + -135, + 165, + 10, + -30, + -70 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-607\n- segment_count: 5\n- arm_base: (0.0, 40.0)\n- target: (22.37, -46.71)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=110\n- joint 3: length=70\n- joint 4: length=90\n- joint 5: length=50\n- obstacles:\n- wall_1: type=bar_horizontal, pattern=warning_stripes\n part 1: x=40, y=-40, width=120, height=40\n- wall_2: type=l_corner, pattern=warning_stripes\n part 1: x=-40, y=80, width=80, height=40\n part 2: x=-40, y=80, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-608.json b/lamp/data/lamp-608.json new file mode 100644 index 0000000000000000000000000000000000000000..67a35ecb0b1854ee65ed530c73920f660dabdc15 --- /dev/null +++ b/lamp/data/lamp-608.json @@ -0,0 +1,127 @@ +{ + "id": "lamp-608", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 120, + "y": 440 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": -40, + "y": -40 + }, + "target": { + "x": 239.23, + "y": -63.29 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "l_corner", + "pattern": "warning_stripes", + "parts": [ + { + "x": 80, + "y": 0, + "width": 80, + "height": 40 + }, + { + "x": 80, + "y": 0, + "width": 40, + "height": 120 + } + ] + }, + { + "id": "wall_2", + "type": "bar_horizontal", + "pattern": "warning_stripes", + "parts": [ + { + "x": -40, + "y": 0, + "width": 120, + "height": 40 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 50 + }, + { + "length": 110 + }, + { + "length": 70 + }, + { + "length": 70 + }, + { + "length": 110 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": -110 + }, + { + "joint": 2, + "angle": -5 + }, + { + "joint": 3, + "angle": 75 + }, + { + "joint": 4, + "angle": 10 + }, + { + "joint": 5, + "angle": -25 + } + ] + }, + "legacy_answer": [ + -110, + -5, + 75, + 10, + -25 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-608\n- segment_count: 5\n- arm_base: (-40.0, -40.0)\n- target: (239.23, -63.29)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=110\n- joint 3: length=70\n- joint 4: length=70\n- joint 5: length=110\n- obstacles:\n- wall_1: type=l_corner, pattern=warning_stripes\n part 1: x=80, y=0, width=80, height=40\n part 2: x=80, y=0, width=40, height=120\n- wall_2: type=bar_horizontal, pattern=warning_stripes\n part 1: x=-40, y=0, width=120, height=40\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/lamp-609.json b/lamp/data/lamp-609.json new file mode 100644 index 0000000000000000000000000000000000000000..719aa10c33732fbb1bf00f54edc3b0fff6dc25fb --- /dev/null +++ b/lamp/data/lamp-609.json @@ -0,0 +1,108 @@ +{ + "id": "lamp-609", + "difficulty": 5, + "workspace": { + "width": 800, + "height": 600, + "gridSize": 40, + "origin": { + "x": 80, + "y": 520 + } + }, + "lamp": { + "lightRadius": 24 + }, + "armBaseOffset": { + "x": 80, + "y": 120 + }, + "target": { + "x": -9.93, + "y": 177.1 + }, + "meta": { + "showDebugInfo": true, + "variant": "walls" + }, + "obstacles": [ + { + "id": "wall_1", + "type": "bar_vertical", + "pattern": "warning_stripes", + "parts": [ + { + "x": 0, + "y": 40, + "width": 40, + "height": 120 + } + ] + } + ], + "arm": { + "segmentCount": 5, + "segments": [ + { + "length": 50 + }, + { + "length": 90 + }, + { + "length": 50 + }, + { + "length": 50 + }, + { + "length": 50 + } + ], + "initialAngles": [ + 0, + 0, + 0, + 0, + 0 + ], + "angleStep": 5, + "angleMin": -180, + "angleMax": 180 + }, + "answer": { + "actions": [ + { + "joint": 1, + "angle": 55 + }, + { + "joint": 2, + "angle": 145 + }, + { + "joint": 3, + "angle": 85 + }, + { + "joint": 4, + "angle": -110 + }, + { + "joint": 5, + "angle": -130 + } + ] + }, + "legacy_answer": [ + 55, + 145, + 85, + -110, + -130 + ], + "prompt": { + "system": "You are a mechanical-arm lamp targeting solver. Given a multi-segment robotic arm anchored at a fixed base, choose one absolute angle for every joint so that the bulb at the arm's tip illuminates the target point.\n\nYou will receive: (a) one rendered image of the workspace showing the arm base, joints, segments, target, and any striped wall obstacles, and (b) a structured text body containing every numeric parameter (segment count, segment lengths, target coordinates, allowed angle range, allowed angle step, light radius, obstacle rectangles).\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the actions schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf the information is insufficient to choose a confident value for some joint, still output a complete FINAL_JSON line covering every joint (use the closest allowed angle from the allowed range). Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose one absolute angle for every joint of a fixed-base mechanical arm so that the bulb at the tip illuminates the target point.\nThe level is solved when the bulb's light radius covers the target AND no rod segment intersects any obstacle.\n\n## 2. WORLD MODEL\n- Arm base: the fixed mounting point of the arm. It does NOT move regardless of joint choices.\n- Joint: a pivot point connecting consecutive arm segments. There is one joint per segment, indexed 1..segment_count.\n- Segment / rod: a rigid white bar of fixed length attached to its joint.\n- Bulb: the light source rigidly attached to the tip of the last segment. Its position is the cumulative endpoint after applying all joint angles to the segments.\n- Light radius: the radius around the bulb within which the target counts as illuminated.\n- Target: the single point the bulb must illuminate.\n- Obstacle: an axis-aligned rectangle (or set of rectangles) the rods must NOT intersect.\n\n## 3. VISUAL LEGEND\n- Orange diamond: arm base (fixed).\n- White lines: arm segments (rods).\n- Blue small circles: joints.\n- Yellow circle: lamp bulb.\n- Pale yellow translucent disc: the lamp's light coverage radius.\n- Orange circle: target point.\n- Amber rectangles with diagonal stripes: obstacles. Rods may not intersect them.\n- Coordinate system: origin (0,0) marked on the grid; x increases to the right, y increases upward.\n\n## 4. INPUT FIELDS\n- sample_id: lamp-609\n- segment_count: 5\n- arm_base: (80.0, 120.0)\n- target: (-9.93, 177.1)\n- light_radius: 24.0\n- angle_min: -180\n- angle_max: 180\n- angle_step: 5\n- segments:\n- joint 1: length=50\n- joint 2: length=90\n- joint 3: length=50\n- joint 4: length=50\n- joint 5: length=50\n- obstacles:\n- wall_1: type=bar_vertical, pattern=warning_stripes\n part 1: x=0, y=40, width=40, height=120\n\n## 5. ACTION VOCABULARY\nA complete answer is one list of `action` objects, exactly one per joint:\n- action: {\"joint\": , \"angle\": }\n- `joint` is 1-indexed and identifies which segment this angle controls.\n- `angle` is the absolute angle of that segment measured counterclockwise from the positive x-axis. Positive values rotate counterclockwise; negative values rotate clockwise.\n\n## 6. CONSTRAINTS\n- The actions list must contain exactly `segment_count` items, one per joint, with no duplicates.\n- Each `angle` is an integer in `[angle_min, angle_max]` that is also a multiple of `angle_step` offset from `angle_min`.\n- Angles are NOT cumulative across joints — each joint's angle is independent of the previous joint.\n- The first segment starts at the arm base. Each subsequent segment starts where the previous one ends.\n- No rod segment may intersect any obstacle rectangle.\n- The level is solved iff the final bulb position is within `light_radius` of the target AND no rod intersects any obstacle.\n\n## 7. SOLVING ADVICE\n- Identify a coarse joint configuration that points the tip toward the target, then refine each angle independently.\n- When obstacles are present, prefer paths that route the rod chain around them; an angle that produces a visually shorter path is not always feasible.\n- The light radius can be tight (often 20–30 units), so even a 5° error on a single joint can miss the target.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"actions\":[{\"joint\":1,\"angle\":},{\"joint\":2,\"angle\":}, ...]}\n- actions: list of length `segment_count`, joints `1..segment_count` each appearing exactly once.\n- joint: integer in `1..segment_count`.\n- angle: integer in `[angle_min, angle_max]`, multiple of `angle_step`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/lamp/data/manifest.json b/lamp/data/manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..e37ec9be52618c1931ebfed56d47536ea3148cb3 --- /dev/null +++ b/lamp/data/manifest.json @@ -0,0 +1,615 @@ +{ + "levels": [ + "lamp-000.json", + "lamp-001.json", + "lamp-002.json", + "lamp-003.json", + "lamp-004.json", + "lamp-005.json", + "lamp-006.json", + "lamp-007.json", + "lamp-008.json", + "lamp-009.json", + "lamp-010.json", + "lamp-011.json", + "lamp-012.json", + "lamp-013.json", + "lamp-014.json", + "lamp-015.json", + "lamp-016.json", + "lamp-017.json", + "lamp-018.json", + "lamp-019.json", + "lamp-020.json", + "lamp-021.json", + "lamp-022.json", + "lamp-023.json", + "lamp-024.json", + "lamp-025.json", + "lamp-026.json", + "lamp-027.json", + "lamp-028.json", + "lamp-029.json", + "lamp-030.json", + "lamp-031.json", + "lamp-032.json", + "lamp-033.json", + "lamp-034.json", + "lamp-035.json", + "lamp-036.json", + "lamp-037.json", + "lamp-038.json", + "lamp-039.json", + "lamp-040.json", + "lamp-041.json", + "lamp-042.json", + "lamp-043.json", + "lamp-044.json", + "lamp-045.json", + "lamp-046.json", + "lamp-047.json", + "lamp-048.json", + "lamp-049.json", + "lamp-050.json", + "lamp-051.json", + "lamp-052.json", + "lamp-053.json", + "lamp-054.json", + "lamp-055.json", + "lamp-056.json", + "lamp-057.json", + "lamp-058.json", + "lamp-059.json", + "lamp-060.json", + "lamp-061.json", + "lamp-062.json", + "lamp-063.json", + "lamp-064.json", + "lamp-065.json", + "lamp-066.json", + "lamp-067.json", + "lamp-068.json", + "lamp-069.json", + "lamp-070.json", + "lamp-071.json", + "lamp-072.json", + "lamp-073.json", + "lamp-074.json", + "lamp-075.json", + "lamp-076.json", + "lamp-077.json", + "lamp-078.json", + "lamp-079.json", + "lamp-080.json", + "lamp-081.json", + "lamp-082.json", + "lamp-083.json", + "lamp-084.json", + "lamp-085.json", + "lamp-086.json", + "lamp-087.json", + "lamp-088.json", + "lamp-089.json", + "lamp-090.json", + "lamp-091.json", + "lamp-092.json", + "lamp-093.json", + "lamp-094.json", + "lamp-095.json", + "lamp-096.json", + "lamp-097.json", + "lamp-098.json", + "lamp-099.json", + "lamp-100.json", + "lamp-101.json", + "lamp-102.json", + "lamp-103.json", + "lamp-104.json", + "lamp-105.json", + "lamp-106.json", + "lamp-107.json", + "lamp-108.json", + "lamp-109.json", + "lamp-110.json", + "lamp-111.json", + "lamp-112.json", + "lamp-113.json", + "lamp-114.json", + "lamp-115.json", + "lamp-116.json", + "lamp-117.json", + "lamp-118.json", + "lamp-119.json", + "lamp-120.json", + "lamp-121.json", + "lamp-122.json", + "lamp-123.json", + "lamp-124.json", + "lamp-125.json", + "lamp-126.json", + "lamp-127.json", + "lamp-128.json", + "lamp-129.json", + "lamp-130.json", + "lamp-131.json", + "lamp-132.json", + "lamp-133.json", + "lamp-134.json", + "lamp-135.json", + "lamp-136.json", + "lamp-137.json", + "lamp-138.json", + "lamp-139.json", + "lamp-140.json", + "lamp-141.json", + "lamp-142.json", + "lamp-143.json", + "lamp-144.json", + "lamp-145.json", + "lamp-146.json", + "lamp-147.json", + "lamp-148.json", + "lamp-149.json", + "lamp-150.json", + "lamp-151.json", + "lamp-152.json", + "lamp-153.json", + "lamp-154.json", + "lamp-155.json", + "lamp-156.json", + "lamp-157.json", + "lamp-158.json", + "lamp-159.json", + "lamp-160.json", + "lamp-161.json", + "lamp-162.json", + "lamp-163.json", + "lamp-164.json", + "lamp-165.json", + "lamp-166.json", + "lamp-167.json", + "lamp-168.json", + "lamp-169.json", + "lamp-170.json", + "lamp-171.json", + "lamp-172.json", + "lamp-173.json", + "lamp-174.json", + "lamp-175.json", + "lamp-176.json", + "lamp-177.json", + "lamp-178.json", + "lamp-179.json", + "lamp-180.json", + "lamp-181.json", + "lamp-182.json", + "lamp-183.json", + "lamp-184.json", + "lamp-185.json", + "lamp-186.json", + "lamp-187.json", + "lamp-188.json", + "lamp-189.json", + "lamp-190.json", + "lamp-191.json", + "lamp-192.json", + "lamp-193.json", + "lamp-194.json", + "lamp-195.json", + "lamp-196.json", + "lamp-197.json", + "lamp-198.json", + "lamp-199.json", + "lamp-200.json", + "lamp-201.json", + "lamp-202.json", + "lamp-203.json", + "lamp-204.json", + "lamp-205.json", + "lamp-206.json", + "lamp-207.json", + "lamp-208.json", + "lamp-209.json", + "lamp-210.json", + "lamp-211.json", + "lamp-212.json", + "lamp-213.json", + "lamp-214.json", + "lamp-215.json", + "lamp-216.json", + "lamp-217.json", + "lamp-218.json", + "lamp-219.json", + "lamp-220.json", + "lamp-221.json", + "lamp-222.json", + "lamp-223.json", + "lamp-224.json", + "lamp-225.json", + "lamp-226.json", + "lamp-227.json", + "lamp-228.json", + "lamp-229.json", + "lamp-230.json", + "lamp-231.json", + "lamp-232.json", + "lamp-233.json", + "lamp-234.json", + "lamp-235.json", + "lamp-236.json", + "lamp-237.json", + "lamp-238.json", + "lamp-239.json", + "lamp-240.json", + "lamp-241.json", + "lamp-242.json", + "lamp-243.json", + "lamp-244.json", + "lamp-245.json", + "lamp-246.json", + "lamp-247.json", + "lamp-248.json", + "lamp-249.json", + "lamp-250.json", + "lamp-251.json", + "lamp-252.json", + "lamp-253.json", + "lamp-254.json", + "lamp-255.json", + "lamp-256.json", + "lamp-257.json", + "lamp-258.json", + "lamp-259.json", + "lamp-260.json", + "lamp-261.json", + "lamp-262.json", + "lamp-263.json", + "lamp-264.json", + "lamp-265.json", + "lamp-266.json", + "lamp-267.json", + "lamp-268.json", + "lamp-269.json", + "lamp-270.json", + "lamp-271.json", + "lamp-272.json", + "lamp-273.json", + "lamp-274.json", + "lamp-275.json", + "lamp-276.json", + "lamp-277.json", + "lamp-278.json", + "lamp-279.json", + "lamp-280.json", + "lamp-281.json", + "lamp-282.json", + "lamp-283.json", + "lamp-284.json", + "lamp-285.json", + "lamp-286.json", + "lamp-287.json", + "lamp-288.json", + "lamp-289.json", + "lamp-290.json", + "lamp-291.json", + "lamp-292.json", + "lamp-293.json", + "lamp-294.json", + "lamp-295.json", + "lamp-296.json", + "lamp-297.json", + "lamp-298.json", + "lamp-299.json", + "lamp-300.json", + "lamp-301.json", + "lamp-302.json", + "lamp-303.json", + "lamp-304.json", + "lamp-305.json", + "lamp-306.json", + "lamp-307.json", + "lamp-308.json", + "lamp-309.json", + "lamp-310.json", + "lamp-311.json", + "lamp-312.json", + "lamp-313.json", + "lamp-314.json", + "lamp-315.json", + "lamp-316.json", + "lamp-317.json", + "lamp-318.json", + "lamp-319.json", + "lamp-320.json", + "lamp-321.json", + "lamp-322.json", + "lamp-323.json", + "lamp-324.json", + "lamp-325.json", + "lamp-326.json", + "lamp-327.json", + "lamp-328.json", + "lamp-329.json", + "lamp-330.json", + "lamp-331.json", + "lamp-332.json", + "lamp-333.json", + "lamp-334.json", + "lamp-335.json", + "lamp-336.json", + "lamp-337.json", + "lamp-338.json", + "lamp-339.json", + "lamp-340.json", + "lamp-341.json", + "lamp-342.json", + "lamp-343.json", + "lamp-344.json", + "lamp-345.json", + "lamp-346.json", + "lamp-347.json", + "lamp-348.json", + "lamp-349.json", + "lamp-350.json", + "lamp-351.json", + "lamp-352.json", + "lamp-353.json", + "lamp-354.json", + "lamp-355.json", + "lamp-356.json", + "lamp-357.json", + "lamp-358.json", + "lamp-359.json", + "lamp-360.json", + "lamp-361.json", + "lamp-362.json", + "lamp-363.json", + "lamp-364.json", + "lamp-365.json", + "lamp-366.json", + "lamp-367.json", + "lamp-368.json", + "lamp-369.json", + "lamp-370.json", + "lamp-371.json", + "lamp-372.json", + "lamp-373.json", + "lamp-374.json", + "lamp-375.json", + "lamp-376.json", + "lamp-377.json", + "lamp-378.json", + "lamp-379.json", + "lamp-380.json", + "lamp-381.json", + "lamp-382.json", + "lamp-383.json", + "lamp-384.json", + "lamp-385.json", + "lamp-386.json", + "lamp-387.json", + "lamp-388.json", + "lamp-389.json", + "lamp-390.json", + "lamp-391.json", + "lamp-392.json", + "lamp-393.json", + "lamp-394.json", + "lamp-395.json", + "lamp-396.json", + "lamp-397.json", + "lamp-398.json", + "lamp-399.json", + "lamp-400.json", + "lamp-401.json", + "lamp-402.json", + "lamp-403.json", + "lamp-404.json", + "lamp-405.json", + "lamp-406.json", + "lamp-407.json", + "lamp-408.json", + "lamp-409.json", + "lamp-410.json", + "lamp-411.json", + "lamp-412.json", + "lamp-413.json", + "lamp-414.json", + "lamp-415.json", + "lamp-416.json", + "lamp-417.json", + "lamp-418.json", + "lamp-419.json", + "lamp-420.json", + "lamp-421.json", + "lamp-422.json", + "lamp-423.json", + "lamp-424.json", + "lamp-425.json", + "lamp-426.json", + "lamp-427.json", + "lamp-428.json", + "lamp-429.json", + "lamp-430.json", + "lamp-431.json", + "lamp-432.json", + "lamp-433.json", + "lamp-434.json", + "lamp-435.json", + "lamp-436.json", + "lamp-437.json", + "lamp-438.json", + "lamp-439.json", + "lamp-440.json", + "lamp-441.json", + "lamp-442.json", + "lamp-443.json", + "lamp-444.json", + "lamp-445.json", + "lamp-446.json", + "lamp-447.json", + "lamp-448.json", + "lamp-449.json", + "lamp-450.json", + "lamp-451.json", + "lamp-452.json", + "lamp-453.json", + "lamp-454.json", + "lamp-455.json", + "lamp-456.json", + "lamp-457.json", + "lamp-458.json", + "lamp-459.json", + "lamp-460.json", + "lamp-461.json", + "lamp-462.json", + "lamp-463.json", + "lamp-464.json", + "lamp-465.json", + "lamp-466.json", + "lamp-467.json", + "lamp-468.json", + "lamp-469.json", + "lamp-470.json", + "lamp-471.json", + "lamp-472.json", + "lamp-473.json", + "lamp-474.json", + "lamp-475.json", + "lamp-476.json", + "lamp-477.json", + "lamp-478.json", + "lamp-479.json", + "lamp-480.json", + "lamp-481.json", + "lamp-482.json", + "lamp-483.json", + "lamp-484.json", + "lamp-485.json", + "lamp-486.json", + "lamp-487.json", + "lamp-488.json", + "lamp-489.json", + "lamp-490.json", + "lamp-491.json", + "lamp-492.json", + "lamp-493.json", + "lamp-494.json", + "lamp-495.json", + "lamp-496.json", + "lamp-497.json", + "lamp-498.json", + "lamp-499.json", + "lamp-500.json", + "lamp-501.json", + "lamp-502.json", + "lamp-503.json", + "lamp-504.json", + "lamp-505.json", + "lamp-506.json", + "lamp-507.json", + "lamp-508.json", + "lamp-509.json", + "lamp-510.json", + "lamp-511.json", + "lamp-512.json", + "lamp-513.json", + "lamp-514.json", + "lamp-515.json", + "lamp-516.json", + "lamp-517.json", + "lamp-518.json", + "lamp-519.json", + "lamp-520.json", + "lamp-521.json", + "lamp-522.json", + "lamp-523.json", + "lamp-524.json", + "lamp-525.json", + "lamp-526.json", + "lamp-527.json", + "lamp-528.json", + "lamp-529.json", + "lamp-530.json", + "lamp-531.json", + "lamp-532.json", + "lamp-533.json", + "lamp-534.json", + "lamp-535.json", + "lamp-536.json", + "lamp-537.json", + "lamp-538.json", + "lamp-539.json", + "lamp-540.json", + "lamp-541.json", + "lamp-542.json", + "lamp-543.json", + "lamp-544.json", + "lamp-545.json", + "lamp-546.json", + "lamp-547.json", + "lamp-548.json", + "lamp-549.json", + "lamp-550.json", + "lamp-551.json", + "lamp-552.json", + "lamp-553.json", + "lamp-554.json", + "lamp-555.json", + "lamp-556.json", + "lamp-557.json", + "lamp-558.json", + "lamp-559.json", + "lamp-560.json", + "lamp-561.json", + "lamp-562.json", + "lamp-563.json", + "lamp-564.json", + "lamp-565.json", + "lamp-566.json", + "lamp-567.json", + "lamp-568.json", + "lamp-569.json", + "lamp-570.json", + "lamp-571.json", + "lamp-572.json", + "lamp-573.json", + "lamp-574.json", + "lamp-575.json", + "lamp-576.json", + "lamp-577.json", + "lamp-578.json", + "lamp-579.json", + "lamp-580.json", + "lamp-581.json", + "lamp-582.json", + "lamp-583.json", + "lamp-584.json", + "lamp-585.json", + "lamp-586.json", + "lamp-587.json", + "lamp-588.json", + "lamp-589.json", + "lamp-590.json", + "lamp-591.json", + "lamp-592.json", + "lamp-593.json", + "lamp-594.json", + "lamp-595.json", + "lamp-596.json", + "lamp-597.json", + "lamp-598.json", + "lamp-599.json", + "lamp-600.json", + "lamp-601.json", + "lamp-602.json", + "lamp-603.json", + "lamp-604.json", + "lamp-605.json", + "lamp-606.json", + "lamp-607.json", + "lamp-608.json", + "lamp-609.json" + ], + "count": 610 +} \ No newline at end of file diff --git a/voi/data/manifest.json b/voi/data/manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..9a2fedb52493a222449c10fa32a117b70ca38029 --- /dev/null +++ b/voi/data/manifest.json @@ -0,0 +1,6607 @@ +{ + "version": 1, + "source": "data_export_600", + "count": 600, + "levels": [ + { + "id": "voi-000", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.234483, + "connectedComponents": 1, + "catalogIndex": 1 + }, + { + "id": "voi-001", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 2 + }, + { + "id": "voi-002", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 3 + }, + { + "id": "voi-003", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 4 + }, + { + "id": "voi-004", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 5 + }, + { + "id": "voi-005", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.234483, + "connectedComponents": 1, + "catalogIndex": 6 + }, + { + "id": "voi-006", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 7 + }, + { + "id": "voi-007", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 8 + }, + { + "id": "voi-008", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 9 + }, + { + "id": "voi-009", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.136364, + "connectedComponents": 1, + "catalogIndex": 10 + }, + { + "id": "voi-010", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.136364, + "connectedComponents": 1, + "catalogIndex": 11 + }, + { + "id": "voi-011", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 12 + }, + { + "id": "voi-012", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 13 + }, + { + "id": "voi-013", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.234483, + "connectedComponents": 1, + "catalogIndex": 14 + }, + { + "id": "voi-014", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 15 + }, + { + "id": "voi-015", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.234483, + "connectedComponents": 1, + "catalogIndex": 16 + }, + { + "id": "voi-016", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 17 + }, + { + "id": "voi-017", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 18 + }, + { + "id": "voi-018", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.136364, + "connectedComponents": 1, + "catalogIndex": 19 + }, + { + "id": "voi-019", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.136364, + "connectedComponents": 1, + "catalogIndex": 20 + }, + { + "id": "voi-020", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 21 + }, + { + "id": "voi-021", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 22 + }, + { + "id": "voi-022", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.136364, + "connectedComponents": 1, + "catalogIndex": 23 + }, + { + "id": "voi-023", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 24 + }, + { + "id": "voi-024", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.136364, + "connectedComponents": 1, + "catalogIndex": 25 + }, + { + "id": "voi-025", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 26 + }, + { + "id": "voi-026", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 27 + }, + { + "id": "voi-027", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 28 + }, + { + "id": "voi-028", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 29 + }, + { + "id": "voi-029", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 30 + }, + { + "id": "voi-030", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.234483, + "connectedComponents": 1, + "catalogIndex": 31 + }, + { + "id": "voi-031", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.234483, + "connectedComponents": 1, + "catalogIndex": 32 + }, + { + "id": "voi-032", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.136364, + "connectedComponents": 1, + "catalogIndex": 33 + }, + { + "id": "voi-033", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 34 + }, + { + "id": "voi-034", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.234483, + "connectedComponents": 1, + "catalogIndex": 35 + }, + { + "id": "voi-035", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 36 + }, + { + "id": "voi-036", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 37 + }, + { + "id": "voi-037", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 38 + }, + { + "id": "voi-038", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 39 + }, + { + "id": "voi-039", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 40 + }, + { + "id": "voi-040", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 41 + }, + { + "id": "voi-041", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 42 + }, + { + "id": "voi-042", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 43 + }, + { + "id": "voi-043", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 44 + }, + { + "id": "voi-044", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 45 + }, + { + "id": "voi-045", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 46 + }, + { + "id": "voi-046", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 47 + }, + { + "id": "voi-047", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 48 + }, + { + "id": "voi-048", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 49 + }, + { + "id": "voi-049", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 50 + }, + { + "id": "voi-050", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.10559, + "connectedComponents": 1, + "catalogIndex": 51 + }, + { + "id": "voi-051", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.150442, + "connectedComponents": 1, + "catalogIndex": 52 + }, + { + "id": "voi-052", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.10559, + "connectedComponents": 1, + "catalogIndex": 53 + }, + { + "id": "voi-053", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.166667, + "connectedComponents": 1, + "catalogIndex": 54 + }, + { + "id": "voi-054", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.162679, + "connectedComponents": 1, + "catalogIndex": 55 + }, + { + "id": "voi-055", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.161137, + "connectedComponents": 1, + "catalogIndex": 56 + }, + { + "id": "voi-056", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.209877, + "connectedComponents": 1, + "catalogIndex": 57 + }, + { + "id": "voi-057", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.161137, + "connectedComponents": 1, + "catalogIndex": 58 + }, + { + "id": "voi-058", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.122449, + "connectedComponents": 1, + "catalogIndex": 59 + }, + { + "id": "voi-059", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.173469, + "connectedComponents": 1, + "catalogIndex": 60 + }, + { + "id": "voi-060", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.25, + "connectedComponents": 1, + "catalogIndex": 61 + }, + { + "id": "voi-061", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 62 + }, + { + "id": "voi-062", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.131783, + "connectedComponents": 1, + "catalogIndex": 63 + }, + { + "id": "voi-063", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 64 + }, + { + "id": "voi-064", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.10559, + "connectedComponents": 1, + "catalogIndex": 65 + }, + { + "id": "voi-065", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.209877, + "connectedComponents": 1, + "catalogIndex": 66 + }, + { + "id": "voi-066", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.198758, + "connectedComponents": 1, + "catalogIndex": 67 + }, + { + "id": "voi-067", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 68 + }, + { + "id": "voi-068", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.130769, + "connectedComponents": 1, + "catalogIndex": 69 + }, + { + "id": "voi-069", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.19209, + "connectedComponents": 1, + "catalogIndex": 70 + }, + { + "id": "voi-070", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.161137, + "connectedComponents": 1, + "catalogIndex": 71 + }, + { + "id": "voi-071", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.10559, + "connectedComponents": 1, + "catalogIndex": 72 + }, + { + "id": "voi-072", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.161137, + "connectedComponents": 1, + "catalogIndex": 73 + }, + { + "id": "voi-073", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 74 + }, + { + "id": "voi-074", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.124542, + "connectedComponents": 1, + "catalogIndex": 75 + }, + { + "id": "voi-075", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.173469, + "connectedComponents": 1, + "catalogIndex": 76 + }, + { + "id": "voi-076", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.173469, + "connectedComponents": 1, + "catalogIndex": 77 + }, + { + "id": "voi-077", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 78 + }, + { + "id": "voi-078", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.150442, + "connectedComponents": 1, + "catalogIndex": 79 + }, + { + "id": "voi-079", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.161137, + "connectedComponents": 1, + "catalogIndex": 80 + }, + { + "id": "voi-080", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.131783, + "connectedComponents": 1, + "catalogIndex": 81 + }, + { + "id": "voi-081", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.171717, + "connectedComponents": 1, + "catalogIndex": 82 + }, + { + "id": "voi-082", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.161137, + "connectedComponents": 1, + "catalogIndex": 83 + }, + { + "id": "voi-083", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.262626, + "connectedComponents": 1, + "catalogIndex": 84 + }, + { + "id": "voi-084", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "connectedComponents": 1, + "catalogIndex": 85 + }, + { + "id": "voi-085", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.162679, + "connectedComponents": 1, + "catalogIndex": 86 + }, + { + "id": "voi-086", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.209877, + "connectedComponents": 1, + "catalogIndex": 87 + }, + { + "id": "voi-087", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.161137, + "connectedComponents": 1, + "catalogIndex": 88 + }, + { + "id": "voi-088", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.198758, + "connectedComponents": 1, + "catalogIndex": 89 + }, + { + "id": "voi-089", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 90 + }, + { + "id": "voi-090", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 91 + }, + { + "id": "voi-091", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.131783, + "connectedComponents": 1, + "catalogIndex": 92 + }, + { + "id": "voi-092", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.161137, + "connectedComponents": 1, + "catalogIndex": 93 + }, + { + "id": "voi-093", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.173469, + "connectedComponents": 1, + "catalogIndex": 94 + }, + { + "id": "voi-094", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.162679, + "connectedComponents": 1, + "catalogIndex": 95 + }, + { + "id": "voi-095", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 96 + }, + { + "id": "voi-096", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.173469, + "connectedComponents": 1, + "catalogIndex": 97 + }, + { + "id": "voi-097", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 98 + }, + { + "id": "voi-098", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.10559, + "connectedComponents": 1, + "catalogIndex": 99 + }, + { + "id": "voi-099", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.161137, + "connectedComponents": 1, + "catalogIndex": 100 + }, + { + "id": "voi-100", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 101 + }, + { + "id": "voi-101", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.133333, + "connectedComponents": 1, + "catalogIndex": 102 + }, + { + "id": "voi-102", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.166667, + "connectedComponents": 1, + "catalogIndex": 103 + }, + { + "id": "voi-103", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.307692, + "connectedComponents": 1, + "catalogIndex": 104 + }, + { + "id": "voi-104", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "connectedComponents": 1, + "catalogIndex": 105 + }, + { + "id": "voi-105", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "connectedComponents": 1, + "catalogIndex": 106 + }, + { + "id": "voi-106", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 107 + }, + { + "id": "voi-107", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 1, + "catalogIndex": 108 + }, + { + "id": "voi-108", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "connectedComponents": 1, + "catalogIndex": 109 + }, + { + "id": "voi-109", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.173442, + "connectedComponents": 1, + "catalogIndex": 110 + }, + { + "id": "voi-110", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 1, + "catalogIndex": 111 + }, + { + "id": "voi-111", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.153846, + "connectedComponents": 1, + "catalogIndex": 112 + }, + { + "id": "voi-112", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.307692, + "connectedComponents": 1, + "catalogIndex": 113 + }, + { + "id": "voi-113", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "connectedComponents": 1, + "catalogIndex": 114 + }, + { + "id": "voi-114", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "connectedComponents": 1, + "catalogIndex": 115 + }, + { + "id": "voi-115", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.166667, + "connectedComponents": 1, + "catalogIndex": 116 + }, + { + "id": "voi-116", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "connectedComponents": 1, + "catalogIndex": 117 + }, + { + "id": "voi-117", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 118 + }, + { + "id": "voi-118", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 119 + }, + { + "id": "voi-119", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 120 + }, + { + "id": "voi-120", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "connectedComponents": 1, + "catalogIndex": 121 + }, + { + "id": "voi-121", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.307692, + "connectedComponents": 1, + "catalogIndex": 122 + }, + { + "id": "voi-122", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.266667, + "connectedComponents": 1, + "catalogIndex": 123 + }, + { + "id": "voi-123", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "connectedComponents": 1, + "catalogIndex": 124 + }, + { + "id": "voi-124", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.142857, + "connectedComponents": 1, + "catalogIndex": 125 + }, + { + "id": "voi-125", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.117241, + "connectedComponents": 1, + "catalogIndex": 126 + }, + { + "id": "voi-126", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 1, + "catalogIndex": 127 + }, + { + "id": "voi-127", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.189911, + "connectedComponents": 1, + "catalogIndex": 128 + }, + { + "id": "voi-128", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.189911, + "connectedComponents": 1, + "catalogIndex": 129 + }, + { + "id": "voi-129", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.124542, + "connectedComponents": 1, + "catalogIndex": 130 + }, + { + "id": "voi-130", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "connectedComponents": 1, + "catalogIndex": 131 + }, + { + "id": "voi-131", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.141079, + "connectedComponents": 1, + "catalogIndex": 132 + }, + { + "id": "voi-132", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.189911, + "connectedComponents": 1, + "catalogIndex": 133 + }, + { + "id": "voi-133", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "connectedComponents": 1, + "catalogIndex": 134 + }, + { + "id": "voi-134", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.25, + "connectedComponents": 1, + "catalogIndex": 135 + }, + { + "id": "voi-135", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "connectedComponents": 1, + "catalogIndex": 136 + }, + { + "id": "voi-136", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.131783, + "connectedComponents": 1, + "catalogIndex": 137 + }, + { + "id": "voi-137", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 138 + }, + { + "id": "voi-138", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "connectedComponents": 1, + "catalogIndex": 139 + }, + { + "id": "voi-139", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "connectedComponents": 1, + "catalogIndex": 140 + }, + { + "id": "voi-140", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.189911, + "connectedComponents": 1, + "catalogIndex": 141 + }, + { + "id": "voi-141", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.131783, + "connectedComponents": 1, + "catalogIndex": 142 + }, + { + "id": "voi-142", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.209836, + "connectedComponents": 1, + "catalogIndex": 143 + }, + { + "id": "voi-143", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.125, + "connectedComponents": 1, + "catalogIndex": 144 + }, + { + "id": "voi-144", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.166667, + "connectedComponents": 1, + "catalogIndex": 145 + }, + { + "id": "voi-145", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.153846, + "connectedComponents": 1, + "catalogIndex": 146 + }, + { + "id": "voi-146", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "connectedComponents": 1, + "catalogIndex": 147 + }, + { + "id": "voi-147", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.142857, + "connectedComponents": 1, + "catalogIndex": 148 + }, + { + "id": "voi-148", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.307692, + "connectedComponents": 1, + "catalogIndex": 149 + }, + { + "id": "voi-149", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 1, + "catalogIndex": 150 + }, + { + "id": "voi-150", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.209836, + "connectedComponents": 1, + "catalogIndex": 151 + }, + { + "id": "voi-151", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 1, + "catalogIndex": 152 + }, + { + "id": "voi-152", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.331606, + "connectedComponents": 1, + "catalogIndex": 153 + }, + { + "id": "voi-153", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 154 + }, + { + "id": "voi-154", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 155 + }, + { + "id": "voi-155", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.253886, + "connectedComponents": 1, + "catalogIndex": 156 + }, + { + "id": "voi-156", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.166667, + "connectedComponents": 1, + "catalogIndex": 157 + }, + { + "id": "voi-157", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "connectedComponents": 1, + "catalogIndex": 158 + }, + { + "id": "voi-158", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.117241, + "connectedComponents": 1, + "catalogIndex": 159 + }, + { + "id": "voi-159", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.166667, + "connectedComponents": 1, + "catalogIndex": 160 + }, + { + "id": "voi-160", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 1, + "catalogIndex": 161 + }, + { + "id": "voi-161", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.141079, + "connectedComponents": 1, + "catalogIndex": 162 + }, + { + "id": "voi-162", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "connectedComponents": 1, + "catalogIndex": 163 + }, + { + "id": "voi-163", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.124542, + "connectedComponents": 1, + "catalogIndex": 164 + }, + { + "id": "voi-164", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.117241, + "connectedComponents": 1, + "catalogIndex": 165 + }, + { + "id": "voi-165", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "connectedComponents": 1, + "catalogIndex": 166 + }, + { + "id": "voi-166", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.153846, + "connectedComponents": 1, + "catalogIndex": 167 + }, + { + "id": "voi-167", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.173442, + "connectedComponents": 1, + "catalogIndex": 168 + }, + { + "id": "voi-168", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.189911, + "connectedComponents": 1, + "catalogIndex": 169 + }, + { + "id": "voi-169", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.166667, + "connectedComponents": 1, + "catalogIndex": 170 + }, + { + "id": "voi-170", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.22069, + "connectedComponents": 1, + "catalogIndex": 171 + }, + { + "id": "voi-171", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.124542, + "connectedComponents": 1, + "catalogIndex": 172 + }, + { + "id": "voi-172", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.307692, + "connectedComponents": 1, + "catalogIndex": 173 + }, + { + "id": "voi-173", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.304348, + "connectedComponents": 1, + "catalogIndex": 174 + }, + { + "id": "voi-174", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.153846, + "connectedComponents": 1, + "catalogIndex": 175 + }, + { + "id": "voi-175", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.130769, + "connectedComponents": 1, + "catalogIndex": 176 + }, + { + "id": "voi-176", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.22069, + "connectedComponents": 1, + "catalogIndex": 177 + }, + { + "id": "voi-177", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.189911, + "connectedComponents": 1, + "catalogIndex": 178 + }, + { + "id": "voi-178", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "connectedComponents": 1, + "catalogIndex": 179 + }, + { + "id": "voi-179", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.22069, + "connectedComponents": 1, + "catalogIndex": 180 + }, + { + "id": "voi-180", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.22069, + "connectedComponents": 1, + "catalogIndex": 181 + }, + { + "id": "voi-181", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "connectedComponents": 1, + "catalogIndex": 182 + }, + { + "id": "voi-182", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 183 + }, + { + "id": "voi-183", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "connectedComponents": 1, + "catalogIndex": 184 + }, + { + "id": "voi-184", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.307692, + "connectedComponents": 1, + "catalogIndex": 185 + }, + { + "id": "voi-185", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "connectedComponents": 1, + "catalogIndex": 186 + }, + { + "id": "voi-186", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.117241, + "connectedComponents": 1, + "catalogIndex": 187 + }, + { + "id": "voi-187", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.166667, + "connectedComponents": 1, + "catalogIndex": 188 + }, + { + "id": "voi-188", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.141079, + "connectedComponents": 1, + "catalogIndex": 189 + }, + { + "id": "voi-189", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 1, + "catalogIndex": 190 + }, + { + "id": "voi-190", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "connectedComponents": 1, + "catalogIndex": 191 + }, + { + "id": "voi-191", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.319202, + "connectedComponents": 1, + "catalogIndex": 192 + }, + { + "id": "voi-192", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.234432, + "connectedComponents": 1, + "catalogIndex": 193 + }, + { + "id": "voi-193", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.131783, + "connectedComponents": 1, + "catalogIndex": 194 + }, + { + "id": "voi-194", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 195 + }, + { + "id": "voi-195", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.131783, + "connectedComponents": 1, + "catalogIndex": 196 + }, + { + "id": "voi-196", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.124542, + "connectedComponents": 1, + "catalogIndex": 197 + }, + { + "id": "voi-197", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "connectedComponents": 1, + "catalogIndex": 198 + }, + { + "id": "voi-198", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.22069, + "connectedComponents": 1, + "catalogIndex": 199 + }, + { + "id": "voi-199", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.153846, + "connectedComponents": 1, + "catalogIndex": 200 + }, + { + "id": "voi-200", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 1, + "catalogIndex": 201 + }, + { + "id": "voi-201", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.189911, + "connectedComponents": 1, + "catalogIndex": 202 + }, + { + "id": "voi-202", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 1, + "catalogIndex": 203 + }, + { + "id": "voi-203", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.307692, + "connectedComponents": 1, + "catalogIndex": 204 + }, + { + "id": "voi-204", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.189911, + "connectedComponents": 1, + "catalogIndex": 205 + }, + { + "id": "voi-205", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.165803, + "connectedComponents": 1, + "catalogIndex": 206 + }, + { + "id": "voi-206", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.307692, + "connectedComponents": 1, + "catalogIndex": 207 + }, + { + "id": "voi-207", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.247273, + "connectedComponents": 1, + "catalogIndex": 208 + }, + { + "id": "voi-208", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.234432, + "connectedComponents": 1, + "catalogIndex": 209 + }, + { + "id": "voi-209", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "connectedComponents": 1, + "catalogIndex": 210 + }, + { + "id": "voi-210", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.166667, + "connectedComponents": 1, + "catalogIndex": 211 + }, + { + "id": "voi-211", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.234432, + "connectedComponents": 1, + "catalogIndex": 212 + }, + { + "id": "voi-212", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.209836, + "connectedComponents": 1, + "catalogIndex": 213 + }, + { + "id": "voi-213", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 1, + "catalogIndex": 214 + }, + { + "id": "voi-214", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "connectedComponents": 1, + "catalogIndex": 215 + }, + { + "id": "voi-215", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.131783, + "connectedComponents": 1, + "catalogIndex": 216 + }, + { + "id": "voi-216", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "connectedComponents": 1, + "catalogIndex": 217 + }, + { + "id": "voi-217", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 1, + "catalogIndex": 218 + }, + { + "id": "voi-218", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.307692, + "connectedComponents": 1, + "catalogIndex": 219 + }, + { + "id": "voi-219", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.265583, + "connectedComponents": 1, + "catalogIndex": 220 + }, + { + "id": "voi-220", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.189911, + "connectedComponents": 1, + "catalogIndex": 221 + }, + { + "id": "voi-221", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 1, + "catalogIndex": 222 + }, + { + "id": "voi-222", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.166667, + "connectedComponents": 1, + "catalogIndex": 223 + }, + { + "id": "voi-223", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.333333, + "connectedComponents": 1, + "catalogIndex": 224 + }, + { + "id": "voi-224", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.290801, + "connectedComponents": 1, + "catalogIndex": 225 + }, + { + "id": "voi-225", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 1, + "catalogIndex": 226 + }, + { + "id": "voi-226", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.25, + "connectedComponents": 1, + "catalogIndex": 227 + }, + { + "id": "voi-227", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "connectedComponents": 1, + "catalogIndex": 228 + }, + { + "id": "voi-228", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "connectedComponents": 1, + "catalogIndex": 229 + }, + { + "id": "voi-229", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 1, + "catalogIndex": 230 + }, + { + "id": "voi-230", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "connectedComponents": 1, + "catalogIndex": 231 + }, + { + "id": "voi-231", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "connectedComponents": 1, + "catalogIndex": 232 + }, + { + "id": "voi-232", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.346883, + "connectedComponents": 1, + "catalogIndex": 233 + }, + { + "id": "voi-233", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 1, + "catalogIndex": 234 + }, + { + "id": "voi-234", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "connectedComponents": 1, + "catalogIndex": 235 + }, + { + "id": "voi-235", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 236 + }, + { + "id": "voi-236", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "connectedComponents": 1, + "catalogIndex": 237 + }, + { + "id": "voi-237", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.209836, + "connectedComponents": 1, + "catalogIndex": 238 + }, + { + "id": "voi-238", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 239 + }, + { + "id": "voi-239", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.141079, + "connectedComponents": 1, + "catalogIndex": 240 + }, + { + "id": "voi-240", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 241 + }, + { + "id": "voi-241", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.141079, + "connectedComponents": 1, + "catalogIndex": 242 + }, + { + "id": "voi-242", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "connectedComponents": 1, + "catalogIndex": 243 + }, + { + "id": "voi-243", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 1, + "catalogIndex": 244 + }, + { + "id": "voi-244", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.189911, + "connectedComponents": 1, + "catalogIndex": 245 + }, + { + "id": "voi-245", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 1, + "catalogIndex": 246 + }, + { + "id": "voi-246", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "connectedComponents": 1, + "catalogIndex": 247 + }, + { + "id": "voi-247", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.217778, + "connectedComponents": 1, + "catalogIndex": 248 + }, + { + "id": "voi-248", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "connectedComponents": 1, + "catalogIndex": 249 + }, + { + "id": "voi-249", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.293333, + "connectedComponents": 1, + "catalogIndex": 250 + }, + { + "id": "voi-250", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.166667, + "connectedComponents": 1, + "catalogIndex": 251 + }, + { + "id": "voi-251", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.173442, + "connectedComponents": 1, + "catalogIndex": 252 + }, + { + "id": "voi-252", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 253 + }, + { + "id": "voi-253", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.266667, + "connectedComponents": 1, + "catalogIndex": 254 + }, + { + "id": "voi-254", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.307692, + "connectedComponents": 1, + "catalogIndex": 255 + }, + { + "id": "voi-255", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.159601, + "connectedComponents": 1, + "catalogIndex": 256 + }, + { + "id": "voi-256", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "connectedComponents": 1, + "catalogIndex": 257 + }, + { + "id": "voi-257", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.130769, + "connectedComponents": 1, + "catalogIndex": 258 + }, + { + "id": "voi-258", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.234432, + "connectedComponents": 1, + "catalogIndex": 259 + }, + { + "id": "voi-259", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "connectedComponents": 1, + "catalogIndex": 260 + }, + { + "id": "voi-260", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.209836, + "connectedComponents": 1, + "catalogIndex": 261 + }, + { + "id": "voi-261", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 1, + "catalogIndex": 262 + }, + { + "id": "voi-262", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.153846, + "connectedComponents": 1, + "catalogIndex": 263 + }, + { + "id": "voi-263", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 1, + "catalogIndex": 264 + }, + { + "id": "voi-264", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.209877, + "connectedComponents": 1, + "catalogIndex": 265 + }, + { + "id": "voi-265", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.166667, + "connectedComponents": 1, + "catalogIndex": 266 + }, + { + "id": "voi-266", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 267 + }, + { + "id": "voi-267", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "connectedComponents": 1, + "catalogIndex": 268 + }, + { + "id": "voi-268", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 1, + "catalogIndex": 269 + }, + { + "id": "voi-269", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 270 + }, + { + "id": "voi-270", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "connectedComponents": 1, + "catalogIndex": 271 + }, + { + "id": "voi-271", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "connectedComponents": 1, + "catalogIndex": 272 + }, + { + "id": "voi-272", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.247273, + "connectedComponents": 1, + "catalogIndex": 273 + }, + { + "id": "voi-273", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 274 + }, + { + "id": "voi-274", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.166667, + "connectedComponents": 1, + "catalogIndex": 275 + }, + { + "id": "voi-275", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.159601, + "connectedComponents": 1, + "catalogIndex": 276 + }, + { + "id": "voi-276", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 277 + }, + { + "id": "voi-277", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.123636, + "connectedComponents": 1, + "catalogIndex": 278 + }, + { + "id": "voi-278", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.22069, + "connectedComponents": 1, + "catalogIndex": 279 + }, + { + "id": "voi-279", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.209836, + "connectedComponents": 1, + "catalogIndex": 280 + }, + { + "id": "voi-280", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "connectedComponents": 1, + "catalogIndex": 281 + }, + { + "id": "voi-281", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.307692, + "connectedComponents": 1, + "catalogIndex": 282 + }, + { + "id": "voi-282", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.209836, + "connectedComponents": 1, + "catalogIndex": 283 + }, + { + "id": "voi-283", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.321311, + "connectedComponents": 1, + "catalogIndex": 284 + }, + { + "id": "voi-284", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.363636, + "connectedComponents": 1, + "catalogIndex": 285 + }, + { + "id": "voi-285", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "connectedComponents": 1, + "catalogIndex": 286 + }, + { + "id": "voi-286", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.198758, + "connectedComponents": 1, + "catalogIndex": 287 + }, + { + "id": "voi-287", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 288 + }, + { + "id": "voi-288", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.198758, + "connectedComponents": 1, + "catalogIndex": 289 + }, + { + "id": "voi-289", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 1, + "catalogIndex": 290 + }, + { + "id": "voi-290", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.173442, + "connectedComponents": 1, + "catalogIndex": 291 + }, + { + "id": "voi-291", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.25, + "connectedComponents": 1, + "catalogIndex": 292 + }, + { + "id": "voi-292", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "connectedComponents": 1, + "catalogIndex": 293 + }, + { + "id": "voi-293", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.131783, + "connectedComponents": 1, + "catalogIndex": 294 + }, + { + "id": "voi-294", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.217778, + "connectedComponents": 1, + "catalogIndex": 295 + }, + { + "id": "voi-295", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.22069, + "connectedComponents": 1, + "catalogIndex": 296 + }, + { + "id": "voi-296", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "connectedComponents": 1, + "catalogIndex": 297 + }, + { + "id": "voi-297", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 298 + }, + { + "id": "voi-298", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.139918, + "connectedComponents": 1, + "catalogIndex": 299 + }, + { + "id": "voi-299", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.284444, + "connectedComponents": 1, + "catalogIndex": 300 + }, + { + "id": "voi-300", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.234432, + "connectedComponents": 1, + "catalogIndex": 301 + }, + { + "id": "voi-301", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 302 + }, + { + "id": "voi-302", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.241966, + "connectedComponents": 1, + "catalogIndex": 303 + }, + { + "id": "voi-303", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.307692, + "connectedComponents": 1, + "catalogIndex": 304 + }, + { + "id": "voi-304", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.333333, + "connectedComponents": 1, + "catalogIndex": 305 + }, + { + "id": "voi-305", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.3, + "connectedComponents": 1, + "catalogIndex": 306 + }, + { + "id": "voi-306", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.180791, + "connectedComponents": 1, + "catalogIndex": 307 + }, + { + "id": "voi-307", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.266667, + "connectedComponents": 1, + "catalogIndex": 308 + }, + { + "id": "voi-308", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.284444, + "connectedComponents": 1, + "catalogIndex": 309 + }, + { + "id": "voi-309", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 1, + "catalogIndex": 310 + }, + { + "id": "voi-310", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.159601, + "connectedComponents": 1, + "catalogIndex": 311 + }, + { + "id": "voi-311", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.242857, + "connectedComponents": 1, + "catalogIndex": 312 + }, + { + "id": "voi-312", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 1, + "catalogIndex": 313 + }, + { + "id": "voi-313", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "connectedComponents": 1, + "catalogIndex": 314 + }, + { + "id": "voi-314", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.26556, + "connectedComponents": 1, + "catalogIndex": 315 + }, + { + "id": "voi-315", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.25, + "connectedComponents": 1, + "catalogIndex": 316 + }, + { + "id": "voi-316", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.235294, + "connectedComponents": 1, + "catalogIndex": 317 + }, + { + "id": "voi-317", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 1, + "catalogIndex": 318 + }, + { + "id": "voi-318", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.276836, + "connectedComponents": 1, + "catalogIndex": 319 + }, + { + "id": "voi-319", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.256809, + "connectedComponents": 1, + "catalogIndex": 320 + }, + { + "id": "voi-320", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 1, + "catalogIndex": 321 + }, + { + "id": "voi-321", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.249027, + "connectedComponents": 1, + "catalogIndex": 322 + }, + { + "id": "voi-322", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.257545, + "connectedComponents": 1, + "catalogIndex": 323 + }, + { + "id": "voi-323", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.16955, + "connectedComponents": 1, + "catalogIndex": 324 + }, + { + "id": "voi-324", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.266667, + "connectedComponents": 1, + "catalogIndex": 325 + }, + { + "id": "voi-325", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.307692, + "connectedComponents": 1, + "catalogIndex": 326 + }, + { + "id": "voi-326", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.235294, + "connectedComponents": 1, + "catalogIndex": 327 + }, + { + "id": "voi-327", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.166667, + "connectedComponents": 1, + "catalogIndex": 328 + }, + { + "id": "voi-328", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 1, + "catalogIndex": 329 + }, + { + "id": "voi-329", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.22069, + "connectedComponents": 1, + "catalogIndex": 330 + }, + { + "id": "voi-330", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.275269, + "connectedComponents": 1, + "catalogIndex": 331 + }, + { + "id": "voi-331", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.168734, + "connectedComponents": 1, + "catalogIndex": 332 + }, + { + "id": "voi-332", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.36, + "connectedComponents": 1, + "catalogIndex": 333 + }, + { + "id": "voi-333", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.275281, + "connectedComponents": 1, + "catalogIndex": 334 + }, + { + "id": "voi-334", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.266667, + "connectedComponents": 1, + "catalogIndex": 335 + }, + { + "id": "voi-335", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.293333, + "connectedComponents": 1, + "catalogIndex": 336 + }, + { + "id": "voi-336", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.319202, + "connectedComponents": 1, + "catalogIndex": 337 + }, + { + "id": "voi-337", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.180791, + "connectedComponents": 1, + "catalogIndex": 338 + }, + { + "id": "voi-338", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 1, + "catalogIndex": 339 + }, + { + "id": "voi-339", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.28739, + "connectedComponents": 1, + "catalogIndex": 340 + }, + { + "id": "voi-340", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.234432, + "connectedComponents": 1, + "catalogIndex": 341 + }, + { + "id": "voi-341", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.208469, + "connectedComponents": 1, + "catalogIndex": 342 + }, + { + "id": "voi-342", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.275269, + "connectedComponents": 1, + "catalogIndex": 343 + }, + { + "id": "voi-343", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.275269, + "connectedComponents": 1, + "catalogIndex": 344 + }, + { + "id": "voi-344", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.209836, + "connectedComponents": 1, + "catalogIndex": 345 + }, + { + "id": "voi-345", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.241966, + "connectedComponents": 1, + "catalogIndex": 346 + }, + { + "id": "voi-346", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.266667, + "connectedComponents": 1, + "catalogIndex": 347 + }, + { + "id": "voi-347", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.180791, + "connectedComponents": 1, + "catalogIndex": 348 + }, + { + "id": "voi-348", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.197531, + "connectedComponents": 1, + "catalogIndex": 349 + }, + { + "id": "voi-349", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.159601, + "connectedComponents": 1, + "catalogIndex": 350 + }, + { + "id": "voi-350", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.319202, + "connectedComponents": 1, + "catalogIndex": 351 + }, + { + "id": "voi-351", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.295612, + "connectedComponents": 1, + "catalogIndex": 352 + }, + { + "id": "voi-352", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.235294, + "connectedComponents": 1, + "catalogIndex": 353 + }, + { + "id": "voi-353", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.345013, + "connectedComponents": 1, + "catalogIndex": 354 + }, + { + "id": "voi-354", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.315789, + "connectedComponents": 1, + "catalogIndex": 355 + }, + { + "id": "voi-355", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.234432, + "connectedComponents": 1, + "catalogIndex": 356 + }, + { + "id": "voi-356", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 1, + "catalogIndex": 357 + }, + { + "id": "voi-357", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.198758, + "connectedComponents": 1, + "catalogIndex": 358 + }, + { + "id": "voi-358", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.248062, + "connectedComponents": 1, + "catalogIndex": 359 + }, + { + "id": "voi-359", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.249027, + "connectedComponents": 1, + "catalogIndex": 360 + }, + { + "id": "voi-360", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.20332, + "connectedComponents": 1, + "catalogIndex": 361 + }, + { + "id": "voi-361", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.319218, + "connectedComponents": 1, + "catalogIndex": 362 + }, + { + "id": "voi-362", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.295612, + "connectedComponents": 1, + "catalogIndex": 363 + }, + { + "id": "voi-363", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.280277, + "connectedComponents": 1, + "catalogIndex": 364 + }, + { + "id": "voi-364", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.26556, + "connectedComponents": 1, + "catalogIndex": 365 + }, + { + "id": "voi-365", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.296703, + "connectedComponents": 1, + "catalogIndex": 366 + }, + { + "id": "voi-366", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.189911, + "connectedComponents": 1, + "catalogIndex": 367 + }, + { + "id": "voi-367", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.25, + "connectedComponents": 1, + "catalogIndex": 368 + }, + { + "id": "voi-368", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.30622, + "connectedComponents": 1, + "catalogIndex": 369 + }, + { + "id": "voi-369", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.166667, + "connectedComponents": 1, + "catalogIndex": 370 + }, + { + "id": "voi-370", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.165803, + "connectedComponents": 1, + "catalogIndex": 371 + }, + { + "id": "voi-371", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.315789, + "connectedComponents": 1, + "catalogIndex": 372 + }, + { + "id": "voi-372", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.361582, + "connectedComponents": 1, + "catalogIndex": 373 + }, + { + "id": "voi-373", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.295612, + "connectedComponents": 1, + "catalogIndex": 374 + }, + { + "id": "voi-374", + "gridSize": 8, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.210526, + "connectedComponents": 1, + "catalogIndex": 375 + }, + { + "id": "voi-375", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.333333, + "connectedComponents": 1, + "catalogIndex": 376 + }, + { + "id": "voi-376", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.266667, + "connectedComponents": 2, + "catalogIndex": 377 + }, + { + "id": "voi-377", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.241966, + "connectedComponents": 2, + "catalogIndex": 378 + }, + { + "id": "voi-378", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.284444, + "connectedComponents": 2, + "catalogIndex": 379 + }, + { + "id": "voi-379", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.275269, + "connectedComponents": 2, + "catalogIndex": 380 + }, + { + "id": "voi-380", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.284444, + "connectedComponents": 2, + "catalogIndex": 381 + }, + { + "id": "voi-381", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.275269, + "connectedComponents": 2, + "catalogIndex": 382 + }, + { + "id": "voi-382", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.256809, + "connectedComponents": 2, + "catalogIndex": 383 + }, + { + "id": "voi-383", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "connectedComponents": 1, + "catalogIndex": 384 + }, + { + "id": "voi-384", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.25, + "connectedComponents": 2, + "catalogIndex": 385 + }, + { + "id": "voi-385", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.282655, + "connectedComponents": 2, + "catalogIndex": 386 + }, + { + "id": "voi-386", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.284444, + "connectedComponents": 1, + "catalogIndex": 387 + }, + { + "id": "voi-387", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.20332, + "connectedComponents": 1, + "catalogIndex": 388 + }, + { + "id": "voi-388", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.235294, + "connectedComponents": 2, + "catalogIndex": 389 + }, + { + "id": "voi-389", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.228164, + "connectedComponents": 2, + "catalogIndex": 390 + }, + { + "id": "voi-390", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.275269, + "connectedComponents": 2, + "catalogIndex": 391 + }, + { + "id": "voi-391", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.266667, + "connectedComponents": 1, + "catalogIndex": 392 + }, + { + "id": "voi-392", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 2, + "catalogIndex": 393 + }, + { + "id": "voi-393", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.25, + "connectedComponents": 2, + "catalogIndex": 394 + }, + { + "id": "voi-394", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.275269, + "connectedComponents": 2, + "catalogIndex": 395 + }, + { + "id": "voi-395", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.266667, + "connectedComponents": 2, + "catalogIndex": 396 + }, + { + "id": "voi-396", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.284444, + "connectedComponents": 2, + "catalogIndex": 397 + }, + { + "id": "voi-397", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.282655, + "connectedComponents": 2, + "catalogIndex": 398 + }, + { + "id": "voi-398", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.266667, + "connectedComponents": 2, + "catalogIndex": 399 + }, + { + "id": "voi-399", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.352941, + "connectedComponents": 1, + "catalogIndex": 400 + }, + { + "id": "voi-400", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.26556, + "connectedComponents": 2, + "catalogIndex": 401 + }, + { + "id": "voi-401", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.333333, + "connectedComponents": 2, + "catalogIndex": 402 + }, + { + "id": "voi-402", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.266667, + "connectedComponents": 2, + "catalogIndex": 403 + }, + { + "id": "voi-403", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 2, + "catalogIndex": 404 + }, + { + "id": "voi-404", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 2, + "catalogIndex": 405 + }, + { + "id": "voi-405", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.275269, + "connectedComponents": 2, + "catalogIndex": 406 + }, + { + "id": "voi-406", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.292035, + "connectedComponents": 2, + "catalogIndex": 407 + }, + { + "id": "voi-407", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.234432, + "connectedComponents": 2, + "catalogIndex": 408 + }, + { + "id": "voi-408", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.272727, + "connectedComponents": 2, + "catalogIndex": 409 + }, + { + "id": "voi-409", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.235294, + "connectedComponents": 1, + "catalogIndex": 410 + }, + { + "id": "voi-410", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.27409, + "connectedComponents": 2, + "catalogIndex": 411 + }, + { + "id": "voi-411", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.266667, + "connectedComponents": 1, + "catalogIndex": 412 + }, + { + "id": "voi-412", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.315789, + "connectedComponents": 2, + "catalogIndex": 413 + }, + { + "id": "voi-413", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.275269, + "connectedComponents": 2, + "catalogIndex": 414 + }, + { + "id": "voi-414", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.210526, + "connectedComponents": 2, + "catalogIndex": 415 + }, + { + "id": "voi-415", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.273859, + "connectedComponents": 2, + "catalogIndex": 416 + }, + { + "id": "voi-416", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 2, + "catalogIndex": 417 + }, + { + "id": "voi-417", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 2, + "catalogIndex": 418 + }, + { + "id": "voi-418", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.235294, + "connectedComponents": 2, + "catalogIndex": 419 + }, + { + "id": "voi-419", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 2, + "catalogIndex": 420 + }, + { + "id": "voi-420", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.256809, + "connectedComponents": 2, + "catalogIndex": 421 + }, + { + "id": "voi-421", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 2, + "catalogIndex": 422 + }, + { + "id": "voi-422", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.325956, + "connectedComponents": 2, + "catalogIndex": 423 + }, + { + "id": "voi-423", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.284444, + "connectedComponents": 2, + "catalogIndex": 424 + }, + { + "id": "voi-424", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.27409, + "connectedComponents": 2, + "catalogIndex": 425 + }, + { + "id": "voi-425", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 2, + "catalogIndex": 426 + }, + { + "id": "voi-426", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 2, + "catalogIndex": 427 + }, + { + "id": "voi-427", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.25, + "connectedComponents": 2, + "catalogIndex": 428 + }, + { + "id": "voi-428", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 2, + "catalogIndex": 429 + }, + { + "id": "voi-429", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.249027, + "connectedComponents": 2, + "catalogIndex": 430 + }, + { + "id": "voi-430", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.266667, + "connectedComponents": 2, + "catalogIndex": 431 + }, + { + "id": "voi-431", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 2, + "catalogIndex": 432 + }, + { + "id": "voi-432", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.333333, + "connectedComponents": 2, + "catalogIndex": 433 + }, + { + "id": "voi-433", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 2, + "catalogIndex": 434 + }, + { + "id": "voi-434", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.249027, + "connectedComponents": 2, + "catalogIndex": 435 + }, + { + "id": "voi-435", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.275269, + "connectedComponents": 1, + "catalogIndex": 436 + }, + { + "id": "voi-436", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.20332, + "connectedComponents": 1, + "catalogIndex": 437 + }, + { + "id": "voi-437", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.375, + "connectedComponents": 1, + "catalogIndex": 438 + }, + { + "id": "voi-438", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 1, + "catalogIndex": 439 + }, + { + "id": "voi-439", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.266667, + "connectedComponents": 2, + "catalogIndex": 440 + }, + { + "id": "voi-440", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 441 + }, + { + "id": "voi-441", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.25, + "connectedComponents": 2, + "catalogIndex": 442 + }, + { + "id": "voi-442", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.256809, + "connectedComponents": 2, + "catalogIndex": 443 + }, + { + "id": "voi-443", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 2, + "catalogIndex": 444 + }, + { + "id": "voi-444", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.275269, + "connectedComponents": 2, + "catalogIndex": 445 + }, + { + "id": "voi-445", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.266667, + "connectedComponents": 2, + "catalogIndex": 446 + }, + { + "id": "voi-446", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.266667, + "connectedComponents": 1, + "catalogIndex": 447 + }, + { + "id": "voi-447", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.275269, + "connectedComponents": 2, + "catalogIndex": 448 + }, + { + "id": "voi-448", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 2, + "catalogIndex": 449 + }, + { + "id": "voi-449", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.26556, + "connectedComponents": 2, + "catalogIndex": 450 + }, + { + "id": "voi-450", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.266667, + "connectedComponents": 2, + "catalogIndex": 451 + }, + { + "id": "voi-451", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 2, + "catalogIndex": 452 + }, + { + "id": "voi-452", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.25, + "connectedComponents": 1, + "catalogIndex": 453 + }, + { + "id": "voi-453", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.266667, + "connectedComponents": 2, + "catalogIndex": 454 + }, + { + "id": "voi-454", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 2, + "catalogIndex": 455 + }, + { + "id": "voi-455", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.315789, + "connectedComponents": 1, + "catalogIndex": 456 + }, + { + "id": "voi-456", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 2, + "catalogIndex": 457 + }, + { + "id": "voi-457", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 458 + }, + { + "id": "voi-458", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.25, + "connectedComponents": 2, + "catalogIndex": 459 + }, + { + "id": "voi-459", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.333333, + "connectedComponents": 2, + "catalogIndex": 460 + }, + { + "id": "voi-460", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.26556, + "connectedComponents": 1, + "catalogIndex": 461 + }, + { + "id": "voi-461", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.333333, + "connectedComponents": 2, + "catalogIndex": 462 + }, + { + "id": "voi-462", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.273859, + "connectedComponents": 2, + "catalogIndex": 463 + }, + { + "id": "voi-463", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.235294, + "connectedComponents": 1, + "catalogIndex": 464 + }, + { + "id": "voi-464", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.266667, + "connectedComponents": 2, + "catalogIndex": 465 + }, + { + "id": "voi-465", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.284444, + "connectedComponents": 2, + "catalogIndex": 466 + }, + { + "id": "voi-466", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.228374, + "connectedComponents": 1, + "catalogIndex": 467 + }, + { + "id": "voi-467", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 2, + "catalogIndex": 468 + }, + { + "id": "voi-468", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.275269, + "connectedComponents": 2, + "catalogIndex": 469 + }, + { + "id": "voi-469", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.284444, + "connectedComponents": 1, + "catalogIndex": 470 + }, + { + "id": "voi-470", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.315789, + "connectedComponents": 2, + "catalogIndex": 471 + }, + { + "id": "voi-471", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 2, + "catalogIndex": 472 + }, + { + "id": "voi-472", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.273859, + "connectedComponents": 2, + "catalogIndex": 473 + }, + { + "id": "voi-473", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.4, + "connectedComponents": 2, + "catalogIndex": 474 + }, + { + "id": "voi-474", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.249027, + "connectedComponents": 2, + "catalogIndex": 475 + }, + { + "id": "voi-475", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.249027, + "connectedComponents": 2, + "catalogIndex": 476 + }, + { + "id": "voi-476", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 2, + "catalogIndex": 477 + }, + { + "id": "voi-477", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.373541, + "connectedComponents": 2, + "catalogIndex": 478 + }, + { + "id": "voi-478", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 2, + "catalogIndex": 479 + }, + { + "id": "voi-479", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.266667, + "connectedComponents": 1, + "catalogIndex": 480 + }, + { + "id": "voi-480", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.235294, + "connectedComponents": 2, + "catalogIndex": 481 + }, + { + "id": "voi-481", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.275269, + "connectedComponents": 2, + "catalogIndex": 482 + }, + { + "id": "voi-482", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.266667, + "connectedComponents": 2, + "catalogIndex": 483 + }, + { + "id": "voi-483", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.26556, + "connectedComponents": 2, + "catalogIndex": 484 + }, + { + "id": "voi-484", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 2, + "catalogIndex": 485 + }, + { + "id": "voi-485", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 2, + "catalogIndex": 486 + }, + { + "id": "voi-486", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.25, + "connectedComponents": 2, + "catalogIndex": 487 + }, + { + "id": "voi-487", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.362949, + "connectedComponents": 2, + "catalogIndex": 488 + }, + { + "id": "voi-488", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.362949, + "connectedComponents": 1, + "catalogIndex": 489 + }, + { + "id": "voi-489", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.257545, + "connectedComponents": 2, + "catalogIndex": 490 + }, + { + "id": "voi-490", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.26556, + "connectedComponents": 2, + "catalogIndex": 491 + }, + { + "id": "voi-491", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 1, + "catalogIndex": 492 + }, + { + "id": "voi-492", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.275269, + "connectedComponents": 2, + "catalogIndex": 493 + }, + { + "id": "voi-493", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 2, + "catalogIndex": 494 + }, + { + "id": "voi-494", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.315789, + "connectedComponents": 2, + "catalogIndex": 495 + }, + { + "id": "voi-495", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.323777, + "connectedComponents": 2, + "catalogIndex": 496 + }, + { + "id": "voi-496", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.241055, + "connectedComponents": 2, + "catalogIndex": 497 + }, + { + "id": "voi-497", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.25, + "connectedComponents": 2, + "catalogIndex": 498 + }, + { + "id": "voi-498", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.375, + "connectedComponents": 2, + "catalogIndex": 499 + }, + { + "id": "voi-499", + "gridSize": 10, + "requiredShapeCount": 4, + "distractorShapeCount": 3, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.273859, + "connectedComponents": 1, + "catalogIndex": 500 + }, + { + "id": "voi-500", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 501 + }, + { + "id": "voi-501", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.234483, + "connectedComponents": 1, + "catalogIndex": 502 + }, + { + "id": "voi-502", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.234483, + "connectedComponents": 1, + "catalogIndex": 503 + }, + { + "id": "voi-503", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 504 + }, + { + "id": "voi-504", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.234483, + "connectedComponents": 1, + "catalogIndex": 505 + }, + { + "id": "voi-505", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 506 + }, + { + "id": "voi-506", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 507 + }, + { + "id": "voi-507", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.136364, + "connectedComponents": 1, + "catalogIndex": 508 + }, + { + "id": "voi-508", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 509 + }, + { + "id": "voi-509", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 510 + }, + { + "id": "voi-510", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.234483, + "connectedComponents": 1, + "catalogIndex": 511 + }, + { + "id": "voi-511", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 512 + }, + { + "id": "voi-512", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 513 + }, + { + "id": "voi-513", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 514 + }, + { + "id": "voi-514", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 515 + }, + { + "id": "voi-515", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 516 + }, + { + "id": "voi-516", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 517 + }, + { + "id": "voi-517", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 518 + }, + { + "id": "voi-518", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 519 + }, + { + "id": "voi-519", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 520 + }, + { + "id": "voi-520", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 521 + }, + { + "id": "voi-521", + "gridSize": 6, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 522 + }, + { + "id": "voi-522", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.161137, + "connectedComponents": 1, + "catalogIndex": 523 + }, + { + "id": "voi-523", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.161137, + "connectedComponents": 1, + "catalogIndex": 524 + }, + { + "id": "voi-524", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.162679, + "connectedComponents": 1, + "catalogIndex": 525 + }, + { + "id": "voi-525", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.2, + "connectedComponents": 1, + "catalogIndex": 526 + }, + { + "id": "voi-526", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.131783, + "connectedComponents": 1, + "catalogIndex": 527 + }, + { + "id": "voi-527", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.10559, + "connectedComponents": 1, + "catalogIndex": 528 + }, + { + "id": "voi-528", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.162679, + "connectedComponents": 1, + "catalogIndex": 529 + }, + { + "id": "voi-529", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.209877, + "connectedComponents": 1, + "catalogIndex": 530 + }, + { + "id": "voi-530", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.173469, + "connectedComponents": 1, + "catalogIndex": 531 + }, + { + "id": "voi-531", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.131783, + "connectedComponents": 1, + "catalogIndex": 532 + }, + { + "id": "voi-532", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.209877, + "connectedComponents": 1, + "catalogIndex": 533 + }, + { + "id": "voi-533", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.162679, + "connectedComponents": 1, + "catalogIndex": 534 + }, + { + "id": "voi-534", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 535 + }, + { + "id": "voi-535", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 536 + }, + { + "id": "voi-536", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 537 + }, + { + "id": "voi-537", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 538 + }, + { + "id": "voi-538", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.162679, + "connectedComponents": 1, + "catalogIndex": 539 + }, + { + "id": "voi-539", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.171717, + "connectedComponents": 1, + "catalogIndex": 540 + }, + { + "id": "voi-540", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.131783, + "connectedComponents": 1, + "catalogIndex": 541 + }, + { + "id": "voi-541", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "connectedComponents": 1, + "catalogIndex": 542 + }, + { + "id": "voi-542", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.161137, + "connectedComponents": 1, + "catalogIndex": 543 + }, + { + "id": "voi-543", + "gridSize": 6, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 544 + }, + { + "id": "voi-544", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 545 + }, + { + "id": "voi-545", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 546 + }, + { + "id": "voi-546", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "connectedComponents": 1, + "catalogIndex": 547 + }, + { + "id": "voi-547", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "connectedComponents": 1, + "catalogIndex": 548 + }, + { + "id": "voi-548", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.276836, + "connectedComponents": 1, + "catalogIndex": 549 + }, + { + "id": "voi-549", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.253886, + "connectedComponents": 1, + "catalogIndex": 550 + }, + { + "id": "voi-550", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.166667, + "connectedComponents": 1, + "catalogIndex": 551 + }, + { + "id": "voi-551", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.275269, + "connectedComponents": 1, + "catalogIndex": 552 + }, + { + "id": "voi-552", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 553 + }, + { + "id": "voi-553", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "connectedComponents": 1, + "catalogIndex": 554 + }, + { + "id": "voi-554", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.123636, + "connectedComponents": 1, + "catalogIndex": 555 + }, + { + "id": "voi-555", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 1, + "catalogIndex": 556 + }, + { + "id": "voi-556", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "connectedComponents": 1, + "catalogIndex": 557 + }, + { + "id": "voi-557", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.234432, + "connectedComponents": 1, + "catalogIndex": 558 + }, + { + "id": "voi-558", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.10559, + "connectedComponents": 1, + "catalogIndex": 559 + }, + { + "id": "voi-559", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.131783, + "connectedComponents": 1, + "catalogIndex": 560 + }, + { + "id": "voi-560", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "connectedComponents": 1, + "catalogIndex": 561 + }, + { + "id": "voi-561", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 1, + "catalogIndex": 562 + }, + { + "id": "voi-562", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.266667, + "connectedComponents": 1, + "catalogIndex": 563 + }, + { + "id": "voi-563", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "connectedComponents": 1, + "catalogIndex": 564 + }, + { + "id": "voi-564", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.209836, + "connectedComponents": 1, + "catalogIndex": 565 + }, + { + "id": "voi-565", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.123636, + "connectedComponents": 1, + "catalogIndex": 566 + }, + { + "id": "voi-566", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.117241, + "connectedComponents": 1, + "catalogIndex": 567 + }, + { + "id": "voi-567", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "connectedComponents": 1, + "catalogIndex": 568 + }, + { + "id": "voi-568", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.125, + "connectedComponents": 1, + "catalogIndex": 569 + }, + { + "id": "voi-569", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 570 + }, + { + "id": "voi-570", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 1, + "catalogIndex": 571 + }, + { + "id": "voi-571", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.111475, + "connectedComponents": 1, + "catalogIndex": 572 + }, + { + "id": "voi-572", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "connectedComponents": 1, + "catalogIndex": 573 + }, + { + "id": "voi-573", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "connectedComponents": 1, + "catalogIndex": 574 + }, + { + "id": "voi-574", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.25, + "connectedComponents": 1, + "catalogIndex": 575 + }, + { + "id": "voi-575", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.307692, + "connectedComponents": 1, + "catalogIndex": 576 + }, + { + "id": "voi-576", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.209836, + "connectedComponents": 1, + "catalogIndex": 577 + }, + { + "id": "voi-577", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.189911, + "connectedComponents": 1, + "catalogIndex": 578 + }, + { + "id": "voi-578", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.333333, + "connectedComponents": 1, + "catalogIndex": 579 + }, + { + "id": "voi-579", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.10559, + "connectedComponents": 1, + "catalogIndex": 580 + }, + { + "id": "voi-580", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "connectedComponents": 1, + "catalogIndex": 581 + }, + { + "id": "voi-581", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.247273, + "connectedComponents": 1, + "catalogIndex": 582 + }, + { + "id": "voi-582", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 583 + }, + { + "id": "voi-583", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 584 + }, + { + "id": "voi-584", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "connectedComponents": 1, + "catalogIndex": 585 + }, + { + "id": "voi-585", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.123636, + "connectedComponents": 1, + "catalogIndex": 586 + }, + { + "id": "voi-586", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "connectedComponents": 1, + "catalogIndex": 587 + }, + { + "id": "voi-587", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.25, + "connectedComponents": 1, + "catalogIndex": 588 + }, + { + "id": "voi-588", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 589 + }, + { + "id": "voi-589", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.307692, + "connectedComponents": 1, + "catalogIndex": 590 + }, + { + "id": "voi-590", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "connectedComponents": 1, + "catalogIndex": 591 + }, + { + "id": "voi-591", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "connectedComponents": 1, + "catalogIndex": 592 + }, + { + "id": "voi-592", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.153846, + "connectedComponents": 1, + "catalogIndex": 593 + }, + { + "id": "voi-593", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "connectedComponents": 1, + "catalogIndex": 594 + }, + { + "id": "voi-594", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.319202, + "connectedComponents": 1, + "catalogIndex": 595 + }, + { + "id": "voi-595", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.319202, + "connectedComponents": 1, + "catalogIndex": 596 + }, + { + "id": "voi-596", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.124542, + "connectedComponents": 1, + "catalogIndex": 597 + }, + { + "id": "voi-597", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.209836, + "connectedComponents": 1, + "catalogIndex": 598 + }, + { + "id": "voi-598", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "connectedComponents": 1, + "catalogIndex": 599 + }, + { + "id": "voi-599", + "gridSize": 8, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.234432, + "connectedComponents": 1, + "catalogIndex": 600 + } + ] +} diff --git a/voi/data/voi-000.json b/voi/data/voi-000.json new file mode 100644 index 0000000000000000000000000000000000000000..bbb3a7481c6337a4f915184f5c13e1b372dd2931 --- /dev/null +++ b/voi/data/voi-000.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 2 + ], + [ + 4, + 2 + ], + [ + 4, + 0 + ], + [ + 6, + 0 + ] + ] + }, + { + "polygon": [ + [ + 4, + 2 + ], + [ + 4, + 1 + ], + [ + 5, + 2 + ] + ] + } + ], + "meta": { + "seed": 4201001, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.234483, + "contourComplexity": 36, + "connectedComponents": 1, + "fillRatio": 0.096354, + "difficultyScore": 0.745223, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 1, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-000/target.png", + "shapes": { + "S1": "../images/voi-000/shape_S1.png", + "S2": "../images/voi-000/shape_S2.png" + } + }, + "ID": "voi-000", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V2", + "grid": [ + 4, + 2 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V3", + "grid": [ + 5, + 2 + ] + } + ] + }, + "legacy_answer": "S1 180 V2 [4,2]\nS2 90 V3 [5,2]", + "solutionText": "S1 180 V2 [4,2]\nS2 90 V3 [5,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-000\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-001.json b/voi/data/voi-001.json new file mode 100644 index 0000000000000000000000000000000000000000..56cc005a34456ab022bd6305ec9b6a25049b0ce1 --- /dev/null +++ b/voi/data/voi-001.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 4 + ], + [ + 3, + 2 + ], + [ + 5, + 4 + ] + ] + }, + { + "polygon": [ + [ + 5, + 1 + ], + [ + 5, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 1 + ] + ] + } + ], + "meta": { + "seed": 4201002, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.423253, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 2, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-001/target.png", + "shapes": { + "S1": "../images/voi-001/shape_S1.png", + "S2": "../images/voi-001/shape_S2.png" + } + }, + "ID": "voi-001", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V1", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V4", + "grid": [ + 3, + 1 + ] + } + ] + }, + "legacy_answer": "S1 90 V1 [3,4]\nS2 270 V4 [3,1]", + "solutionText": "S1 90 V1 [3,4]\nS2 270 V4 [3,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-001\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-002.json b/voi/data/voi-002.json new file mode 100644 index 0000000000000000000000000000000000000000..0f061fea4f420b754bb03a8a4a760e5560f60cf2 --- /dev/null +++ b/voi/data/voi-002.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 6 + ], + [ + 3, + 4 + ], + [ + 5, + 6 + ] + ] + }, + { + "polygon": [ + [ + 5, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 3 + ], + [ + 5, + 3 + ] + ] + } + ], + "meta": { + "seed": 4201003, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.423253, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 3, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-002/target.png", + "shapes": { + "S1": "../images/voi-002/shape_S1.png", + "S2": "../images/voi-002/shape_S2.png" + } + }, + "ID": "voi-002", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V1", + "grid": [ + 3, + 6 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V1", + "grid": [ + 5, + 5 + ] + } + ] + }, + "legacy_answer": "S1 90 V1 [3,6]\nS2 180 V1 [5,5]", + "solutionText": "S1 90 V1 [3,6]\nS2 180 V1 [5,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-002\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-003.json b/voi/data/voi-003.json new file mode 100644 index 0000000000000000000000000000000000000000..f60f365f64abb1145c6d40ed36eb8d0ac15295f0 --- /dev/null +++ b/voi/data/voi-003.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 1 + ], + [ + 3, + 3 + ], + [ + 1, + 1 + ] + ] + }, + { + "polygon": [ + [ + 3, + 4 + ], + [ + 1, + 4 + ], + [ + 1, + 2 + ], + [ + 3, + 2 + ] + ] + } + ], + "meta": { + "seed": 4201004, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.423253, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 4, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-003/target.png", + "shapes": { + "S1": "../images/voi-003/shape_S1.png", + "S2": "../images/voi-003/shape_S2.png" + } + }, + "ID": "voi-003", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V1", + "grid": [ + 3, + 1 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V1", + "grid": [ + 3, + 4 + ] + } + ] + }, + "legacy_answer": "S1 270 V1 [3,1]\nS2 180 V1 [3,4]", + "solutionText": "S1 270 V1 [3,1]\nS2 180 V1 [3,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-003\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-004.json b/voi/data/voi-004.json new file mode 100644 index 0000000000000000000000000000000000000000..132d14cca06cc60859bae13e8aee7bf1c6263b12 --- /dev/null +++ b/voi/data/voi-004.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 4 + ], + [ + 4, + 4 + ], + [ + 4, + 6 + ], + [ + 2, + 6 + ] + ] + }, + { + "polygon": [ + [ + 2, + 3 + ], + [ + 4, + 3 + ], + [ + 2, + 5 + ] + ] + } + ], + "meta": { + "seed": 4201005, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.423253, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 5, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-004/target.png", + "shapes": { + "S1": "../images/voi-004/shape_S1.png", + "S2": "../images/voi-004/shape_S2.png" + } + }, + "ID": "voi-004", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V3", + "grid": [ + 4, + 6 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V1", + "grid": [ + 2, + 3 + ] + } + ] + }, + "legacy_answer": "S1 0 V3 [4,6]\nS2 0 V1 [2,3]", + "solutionText": "S1 0 V3 [4,6]\nS2 0 V1 [2,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-004\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-005.json b/voi/data/voi-005.json new file mode 100644 index 0000000000000000000000000000000000000000..bfe118a5df49c8be26549d9e5803310cac414e0a --- /dev/null +++ b/voi/data/voi-005.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 4 + ], + [ + 5, + 5 + ], + [ + 4, + 4 + ] + ] + }, + { + "polygon": [ + [ + 5, + 4 + ], + [ + 5, + 6 + ], + [ + 3, + 6 + ], + [ + 3, + 4 + ] + ] + } + ], + "meta": { + "seed": 4201006, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.234483, + "contourComplexity": 36, + "connectedComponents": 1, + "fillRatio": 0.096354, + "difficultyScore": 0.745223, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 6, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-005/target.png", + "shapes": { + "S1": "../images/voi-005/shape_S1.png", + "S2": "../images/voi-005/shape_S2.png" + } + }, + "ID": "voi-005", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V1", + "grid": [ + 5, + 4 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V1", + "grid": [ + 5, + 4 + ] + } + ] + }, + "legacy_answer": "S1 270 V1 [5,4]\nS2 270 V1 [5,4]", + "solutionText": "S1 270 V1 [5,4]\nS2 270 V1 [5,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-005\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-006.json b/voi/data/voi-006.json new file mode 100644 index 0000000000000000000000000000000000000000..f511bf2f25f8b78dd5f564aa064e92553a84624f --- /dev/null +++ b/voi/data/voi-006.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 4 + ], + [ + 4, + 4 + ], + [ + 6, + 2 + ] + ] + }, + { + "polygon": [ + [ + 4, + 1 + ], + [ + 6, + 1 + ], + [ + 6, + 3 + ], + [ + 4, + 3 + ] + ] + } + ], + "meta": { + "seed": 4201007, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.423253, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 7, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-006/target.png", + "shapes": { + "S1": "../images/voi-006/shape_S1.png", + "S2": "../images/voi-006/shape_S2.png" + } + }, + "ID": "voi-006", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V1", + "grid": [ + 6, + 4 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V1", + "grid": [ + 4, + 1 + ] + } + ] + }, + "legacy_answer": "S1 180 V1 [6,4]\nS2 0 V1 [4,1]", + "solutionText": "S1 180 V1 [6,4]\nS2 0 V1 [4,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-006\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-007.json b/voi/data/voi-007.json new file mode 100644 index 0000000000000000000000000000000000000000..4f1fc890313a553bcf430dc512eda4e9c428dc4d --- /dev/null +++ b/voi/data/voi-007.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 0 + ], + [ + 4, + 2 + ], + [ + 2, + 0 + ] + ] + }, + { + "polygon": [ + [ + 2, + 1 + ], + [ + 4, + 1 + ], + [ + 4, + 3 + ], + [ + 2, + 3 + ] + ] + } + ], + "meta": { + "seed": 4201008, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.423253, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 8, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-007/target.png", + "shapes": { + "S1": "../images/voi-007/shape_S1.png", + "S2": "../images/voi-007/shape_S2.png" + } + }, + "ID": "voi-007", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V2", + "grid": [ + 4, + 2 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V4", + "grid": [ + 2, + 3 + ] + } + ] + }, + "legacy_answer": "S1 270 V2 [4,2]\nS2 0 V4 [2,3]", + "solutionText": "S1 270 V2 [4,2]\nS2 0 V4 [2,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-007\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-008.json b/voi/data/voi-008.json new file mode 100644 index 0000000000000000000000000000000000000000..ccf52e0c8dd9eafd716773d0bb52c36d87492374 --- /dev/null +++ b/voi/data/voi-008.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 6 + ], + [ + 2, + 6 + ], + [ + 4, + 4 + ] + ] + }, + { + "polygon": [ + [ + 2, + 5 + ], + [ + 2, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 5 + ] + ] + } + ], + "meta": { + "seed": 4201009, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.423253, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 9, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-008/target.png", + "shapes": { + "S1": "../images/voi-008/shape_S1.png", + "S2": "../images/voi-008/shape_S2.png" + } + }, + "ID": "voi-008", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V3", + "grid": [ + 4, + 4 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V3", + "grid": [ + 4, + 3 + ] + } + ] + }, + "legacy_answer": "S1 180 V3 [4,4]\nS2 90 V3 [4,3]", + "solutionText": "S1 180 V3 [4,4]\nS2 90 V3 [4,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-008\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-009.json b/voi/data/voi-009.json new file mode 100644 index 0000000000000000000000000000000000000000..e0ab9635707afada9b2eb81ec12c56bce0fd79c6 --- /dev/null +++ b/voi/data/voi-009.json @@ -0,0 +1,119 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 4 + ], + [ + 3, + 4 + ], + [ + 5, + 2 + ] + ] + }, + { + "polygon": [ + [ + 5, + 1 + ], + [ + 5, + 3 + ], + [ + 3, + 1 + ] + ] + } + ], + "meta": { + "seed": 4201010, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.136364, + "contourComplexity": 128, + "connectedComponents": 1, + "fillRatio": 0.098958, + "difficultyScore": 0.456629, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 10, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-009/target.png", + "shapes": { + "S1": "../images/voi-009/shape_S1.png", + "S2": "../images/voi-009/shape_S2.png" + } + }, + "ID": "voi-009", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V2", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V2", + "grid": [ + 5, + 3 + ] + } + ] + }, + "legacy_answer": "S1 180 V2 [3,4]\nS2 270 V2 [5,3]", + "solutionText": "S1 180 V2 [3,4]\nS2 270 V2 [5,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-009\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-010.json b/voi/data/voi-010.json new file mode 100644 index 0000000000000000000000000000000000000000..e776761fe11c84fa819cba9edc3ffb1682cbbc1d --- /dev/null +++ b/voi/data/voi-010.json @@ -0,0 +1,119 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 3 + ], + [ + 2, + 3 + ], + [ + 4, + 1 + ] + ] + }, + { + "polygon": [ + [ + 3, + 1 + ], + [ + 3, + 3 + ], + [ + 1, + 1 + ] + ] + } + ], + "meta": { + "seed": 4201011, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.136364, + "contourComplexity": 128, + "connectedComponents": 1, + "fillRatio": 0.098958, + "difficultyScore": 0.456629, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 11, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-010/target.png", + "shapes": { + "S1": "../images/voi-010/shape_S1.png", + "S2": "../images/voi-010/shape_S2.png" + } + }, + "ID": "voi-010", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V2", + "grid": [ + 2, + 3 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V1", + "grid": [ + 3, + 1 + ] + } + ] + }, + "legacy_answer": "S1 180 V2 [2,3]\nS2 270 V1 [3,1]", + "solutionText": "S1 180 V2 [2,3]\nS2 270 V1 [3,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-010\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-011.json b/voi/data/voi-011.json new file mode 100644 index 0000000000000000000000000000000000000000..83848bd1f59920e91f9150288b569b4f0124b1dc --- /dev/null +++ b/voi/data/voi-011.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 3 + ], + [ + 4, + 3 + ], + [ + 2, + 5 + ] + ] + }, + { + "polygon": [ + [ + 3, + 5 + ], + [ + 3, + 3 + ], + [ + 5, + 3 + ], + [ + 5, + 5 + ] + ] + } + ], + "meta": { + "seed": 4201012, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.423253, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 12, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-011/target.png", + "shapes": { + "S1": "../images/voi-011/shape_S1.png", + "S2": "../images/voi-011/shape_S2.png" + } + }, + "ID": "voi-011", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V2", + "grid": [ + 4, + 3 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V1", + "grid": [ + 3, + 5 + ] + } + ] + }, + "legacy_answer": "S1 0 V2 [4,3]\nS2 90 V1 [3,5]", + "solutionText": "S1 0 V2 [4,3]\nS2 90 V1 [3,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-011\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-012.json b/voi/data/voi-012.json new file mode 100644 index 0000000000000000000000000000000000000000..4a9943f27d7b8cb0ea164c1198caa625bb3a7ccc --- /dev/null +++ b/voi/data/voi-012.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 3 + ], + [ + 2, + 3 + ], + [ + 2, + 1 + ], + [ + 4, + 1 + ] + ] + }, + { + "polygon": [ + [ + 2, + 4 + ], + [ + 2, + 2 + ], + [ + 4, + 4 + ] + ] + } + ], + "meta": { + "seed": 4201014, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.423253, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 13, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-012/target.png", + "shapes": { + "S1": "../images/voi-012/shape_S1.png", + "S2": "../images/voi-012/shape_S2.png" + } + }, + "ID": "voi-012", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V3", + "grid": [ + 2, + 1 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V3", + "grid": [ + 4, + 4 + ] + } + ] + }, + "legacy_answer": "S1 180 V3 [2,1]\nS2 90 V3 [4,4]", + "solutionText": "S1 180 V3 [2,1]\nS2 90 V3 [4,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-012\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-013.json b/voi/data/voi-013.json new file mode 100644 index 0000000000000000000000000000000000000000..8f4511a8a2ad1a8c79fe7ab357e6e69cf3c66914 --- /dev/null +++ b/voi/data/voi-013.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 3 + ], + [ + 6, + 3 + ], + [ + 5, + 4 + ] + ] + }, + { + "polygon": [ + [ + 6, + 3 + ], + [ + 6, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 3 + ] + ] + } + ], + "meta": { + "seed": 4201015, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.234483, + "contourComplexity": 36, + "connectedComponents": 1, + "fillRatio": 0.096354, + "difficultyScore": 0.745223, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 14, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-013/target.png", + "shapes": { + "S1": "../images/voi-013/shape_S1.png", + "S2": "../images/voi-013/shape_S2.png" + } + }, + "ID": "voi-013", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V3", + "grid": [ + 5, + 4 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V2", + "grid": [ + 6, + 5 + ] + } + ] + }, + "legacy_answer": "S1 0 V3 [5,4]\nS2 270 V2 [6,5]", + "solutionText": "S1 0 V3 [5,4]\nS2 270 V2 [6,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-013\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-014.json b/voi/data/voi-014.json new file mode 100644 index 0000000000000000000000000000000000000000..1fd42821b1af5e38850012cd2d759621d66735c9 --- /dev/null +++ b/voi/data/voi-014.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 4 + ], + [ + 3, + 2 + ], + [ + 5, + 2 + ], + [ + 5, + 4 + ] + ] + }, + { + "polygon": [ + [ + 5, + 5 + ], + [ + 3, + 5 + ], + [ + 5, + 3 + ] + ] + } + ], + "meta": { + "seed": 4201016, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.423253, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 15, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-014/target.png", + "shapes": { + "S1": "../images/voi-014/shape_S1.png", + "S2": "../images/voi-014/shape_S2.png" + } + }, + "ID": "voi-014", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V3", + "grid": [ + 5, + 2 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V1", + "grid": [ + 5, + 5 + ] + } + ] + }, + "legacy_answer": "S1 90 V3 [5,2]\nS2 180 V1 [5,5]", + "solutionText": "S1 90 V3 [5,2]\nS2 180 V1 [5,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-014\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-015.json b/voi/data/voi-015.json new file mode 100644 index 0000000000000000000000000000000000000000..f41fa3da54deb33ed32acf89c6b51563d3cf7d38 --- /dev/null +++ b/voi/data/voi-015.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 2 + ], + [ + 3, + 4 + ], + [ + 1, + 4 + ], + [ + 1, + 2 + ] + ] + }, + { + "polygon": [ + [ + 1, + 4 + ], + [ + 1, + 3 + ], + [ + 2, + 4 + ] + ] + } + ], + "meta": { + "seed": 4201017, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.234483, + "contourComplexity": 36, + "connectedComponents": 1, + "fillRatio": 0.096354, + "difficultyScore": 0.745223, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 16, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-015/target.png", + "shapes": { + "S1": "../images/voi-015/shape_S1.png", + "S2": "../images/voi-015/shape_S2.png" + } + }, + "ID": "voi-015", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V2", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V1", + "grid": [ + 1, + 4 + ] + } + ] + }, + "legacy_answer": "S1 270 V2 [3,4]\nS2 90 V1 [1,4]", + "solutionText": "S1 270 V2 [3,4]\nS2 90 V1 [1,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-015\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-016.json b/voi/data/voi-016.json new file mode 100644 index 0000000000000000000000000000000000000000..b436f0db91eb5bc32d47a6f9a874483087fc0837 --- /dev/null +++ b/voi/data/voi-016.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 0 + ], + [ + 4, + 0 + ], + [ + 2, + 2 + ] + ] + }, + { + "polygon": [ + [ + 2, + 1 + ], + [ + 4, + 1 + ], + [ + 4, + 3 + ], + [ + 2, + 3 + ] + ] + } + ], + "meta": { + "seed": 4201019, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.423253, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 17, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-016/target.png", + "shapes": { + "S1": "../images/voi-016/shape_S1.png", + "S2": "../images/voi-016/shape_S2.png" + } + }, + "ID": "voi-016", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V2", + "grid": [ + 4, + 0 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V1", + "grid": [ + 2, + 1 + ] + } + ] + }, + "legacy_answer": "S1 0 V2 [4,0]\nS2 0 V1 [2,1]", + "solutionText": "S1 0 V2 [4,0]\nS2 0 V1 [2,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-016\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-017.json b/voi/data/voi-017.json new file mode 100644 index 0000000000000000000000000000000000000000..0ed3b74a0eec6edf96ba189e46f2732d7a9c5fc4 --- /dev/null +++ b/voi/data/voi-017.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 1 + ], + [ + 4, + 3 + ], + [ + 2, + 1 + ] + ] + }, + { + "polygon": [ + [ + 4, + 4 + ], + [ + 2, + 4 + ], + [ + 2, + 2 + ], + [ + 4, + 2 + ] + ] + } + ], + "meta": { + "seed": 4201020, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.423253, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 18, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-017/target.png", + "shapes": { + "S1": "../images/voi-017/shape_S1.png", + "S2": "../images/voi-017/shape_S2.png" + } + }, + "ID": "voi-017", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V1", + "grid": [ + 4, + 1 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V4", + "grid": [ + 4, + 2 + ] + } + ] + }, + "legacy_answer": "S1 270 V1 [4,1]\nS2 180 V4 [4,2]", + "solutionText": "S1 270 V1 [4,1]\nS2 180 V4 [4,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-017\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-018.json b/voi/data/voi-018.json new file mode 100644 index 0000000000000000000000000000000000000000..3e529789f97d829c54b500251be84c12974a598f --- /dev/null +++ b/voi/data/voi-018.json @@ -0,0 +1,119 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 3 + ], + [ + 0, + 3 + ], + [ + 2, + 1 + ] + ] + }, + { + "polygon": [ + [ + 0, + 2 + ], + [ + 0, + 0 + ], + [ + 2, + 2 + ] + ] + } + ], + "meta": { + "seed": 4201021, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.136364, + "contourComplexity": 128, + "connectedComponents": 1, + "fillRatio": 0.098958, + "difficultyScore": 0.456629, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 19, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-018/target.png", + "shapes": { + "S1": "../images/voi-018/shape_S1.png", + "S2": "../images/voi-018/shape_S2.png" + } + }, + "ID": "voi-018", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V1", + "grid": [ + 2, + 3 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V2", + "grid": [ + 0, + 0 + ] + } + ] + }, + "legacy_answer": "S1 180 V1 [2,3]\nS2 90 V2 [0,0]", + "solutionText": "S1 180 V1 [2,3]\nS2 90 V2 [0,0]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-018\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-019.json b/voi/data/voi-019.json new file mode 100644 index 0000000000000000000000000000000000000000..b2ac06414aa60cb1fb4d657d3590a2d9bc6bd236 --- /dev/null +++ b/voi/data/voi-019.json @@ -0,0 +1,119 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 4 + ], + [ + 4, + 4 + ], + [ + 6, + 2 + ] + ] + }, + { + "polygon": [ + [ + 4, + 5 + ], + [ + 4, + 3 + ], + [ + 6, + 5 + ] + ] + } + ], + "meta": { + "seed": 4201022, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.136364, + "contourComplexity": 128, + "connectedComponents": 1, + "fillRatio": 0.098958, + "difficultyScore": 0.456629, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 20, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-019/target.png", + "shapes": { + "S1": "../images/voi-019/shape_S1.png", + "S2": "../images/voi-019/shape_S2.png" + } + }, + "ID": "voi-019", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V1", + "grid": [ + 6, + 4 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V3", + "grid": [ + 6, + 5 + ] + } + ] + }, + "legacy_answer": "S1 180 V1 [6,4]\nS2 90 V3 [6,5]", + "solutionText": "S1 180 V1 [6,4]\nS2 90 V3 [6,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-019\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-020.json b/voi/data/voi-020.json new file mode 100644 index 0000000000000000000000000000000000000000..ab434e59db3c8c220874fbcbda6a785e369821d5 --- /dev/null +++ b/voi/data/voi-020.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 3 + ], + [ + 5, + 3 + ] + ] + }, + { + "polygon": [ + [ + 6, + 5 + ], + [ + 4, + 5 + ], + [ + 6, + 3 + ] + ] + } + ], + "meta": { + "seed": 4201023, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.423253, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 21, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-020/target.png", + "shapes": { + "S1": "../images/voi-020/shape_S1.png", + "S2": "../images/voi-020/shape_S2.png" + } + }, + "ID": "voi-020", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V1", + "grid": [ + 5, + 5 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V2", + "grid": [ + 4, + 5 + ] + } + ] + }, + "legacy_answer": "S1 180 V1 [5,5]\nS2 180 V2 [4,5]", + "solutionText": "S1 180 V1 [5,5]\nS2 180 V2 [4,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-020\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-021.json b/voi/data/voi-021.json new file mode 100644 index 0000000000000000000000000000000000000000..9fa4f4349f876170dc9041920e09adb7cfbf08b3 --- /dev/null +++ b/voi/data/voi-021.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 5 + ], + [ + 0, + 5 + ], + [ + 2, + 3 + ] + ] + }, + { + "polygon": [ + [ + 0, + 4 + ], + [ + 0, + 2 + ], + [ + 2, + 2 + ], + [ + 2, + 4 + ] + ] + } + ], + "meta": { + "seed": 4201024, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.423253, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 22, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-021/target.png", + "shapes": { + "S1": "../images/voi-021/shape_S1.png", + "S2": "../images/voi-021/shape_S2.png" + } + }, + "ID": "voi-021", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V2", + "grid": [ + 0, + 5 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V3", + "grid": [ + 2, + 2 + ] + } + ] + }, + "legacy_answer": "S1 180 V2 [0,5]\nS2 90 V3 [2,2]", + "solutionText": "S1 180 V2 [0,5]\nS2 90 V3 [2,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-021\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-022.json b/voi/data/voi-022.json new file mode 100644 index 0000000000000000000000000000000000000000..32b9380e27de7fc4a533a953c683a32be03b449e --- /dev/null +++ b/voi/data/voi-022.json @@ -0,0 +1,119 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 4 + ], + [ + 4, + 6 + ], + [ + 2, + 4 + ] + ] + }, + { + "polygon": [ + [ + 3, + 6 + ], + [ + 1, + 6 + ], + [ + 3, + 4 + ] + ] + } + ], + "meta": { + "seed": 4201025, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.136364, + "contourComplexity": 128, + "connectedComponents": 1, + "fillRatio": 0.098958, + "difficultyScore": 0.456629, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 23, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-022/target.png", + "shapes": { + "S1": "../images/voi-022/shape_S1.png", + "S2": "../images/voi-022/shape_S2.png" + } + }, + "ID": "voi-022", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V3", + "grid": [ + 2, + 4 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V2", + "grid": [ + 1, + 6 + ] + } + ] + }, + "legacy_answer": "S1 270 V3 [2,4]\nS2 180 V2 [1,6]", + "solutionText": "S1 270 V3 [2,4]\nS2 180 V2 [1,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-022\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-023.json b/voi/data/voi-023.json new file mode 100644 index 0000000000000000000000000000000000000000..3149916a41af17f218179e75ba17d5b2b5e7293c --- /dev/null +++ b/voi/data/voi-023.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 3 + ], + [ + 5, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 6, + 3 + ], + [ + 6, + 5 + ], + [ + 4, + 3 + ] + ] + } + ], + "meta": { + "seed": 4201026, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.423253, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 24, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-023/target.png", + "shapes": { + "S1": "../images/voi-023/shape_S1.png", + "S2": "../images/voi-023/shape_S2.png" + } + }, + "ID": "voi-023", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V2", + "grid": [ + 5, + 5 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V3", + "grid": [ + 4, + 3 + ] + } + ] + }, + "legacy_answer": "S1 270 V2 [5,5]\nS2 270 V3 [4,3]", + "solutionText": "S1 270 V2 [5,5]\nS2 270 V3 [4,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-023\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-024.json b/voi/data/voi-024.json new file mode 100644 index 0000000000000000000000000000000000000000..8ab367af4c8bc81910fd6c683cf4433a4fc949f5 --- /dev/null +++ b/voi/data/voi-024.json @@ -0,0 +1,119 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 1, + 2 + ], + [ + 3, + 2 + ], + [ + 1, + 4 + ] + ] + }, + { + "polygon": [ + [ + 1, + 5 + ], + [ + 1, + 3 + ], + [ + 3, + 5 + ] + ] + } + ], + "meta": { + "seed": 4201027, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.136364, + "contourComplexity": 128, + "connectedComponents": 1, + "fillRatio": 0.098958, + "difficultyScore": 0.456629, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 25, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-024/target.png", + "shapes": { + "S1": "../images/voi-024/shape_S1.png", + "S2": "../images/voi-024/shape_S2.png" + } + }, + "ID": "voi-024", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V3", + "grid": [ + 1, + 4 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V2", + "grid": [ + 1, + 3 + ] + } + ] + }, + "legacy_answer": "S1 0 V3 [1,4]\nS2 90 V2 [1,3]", + "solutionText": "S1 0 V3 [1,4]\nS2 90 V2 [1,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-024\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-025.json b/voi/data/voi-025.json new file mode 100644 index 0000000000000000000000000000000000000000..2ef71e17a55006fa99b2bda6d3d145bde29f56e8 --- /dev/null +++ b/voi/data/voi-025.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 3 + ], + [ + 5, + 3 + ], + [ + 3, + 5 + ] + ] + }, + { + "polygon": [ + [ + 6, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 3 + ], + [ + 6, + 3 + ] + ] + } + ], + "meta": { + "seed": 4201028, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.423253, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 26, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-025/target.png", + "shapes": { + "S1": "../images/voi-025/shape_S1.png", + "S2": "../images/voi-025/shape_S2.png" + } + }, + "ID": "voi-025", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V1", + "grid": [ + 3, + 3 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V1", + "grid": [ + 6, + 5 + ] + } + ] + }, + "legacy_answer": "S1 0 V1 [3,3]\nS2 180 V1 [6,5]", + "solutionText": "S1 0 V1 [3,3]\nS2 180 V1 [6,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-025\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-026.json b/voi/data/voi-026.json new file mode 100644 index 0000000000000000000000000000000000000000..e54209414fc2ac90f3a0869e7de43ae7b1b38e17 --- /dev/null +++ b/voi/data/voi-026.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 6 + ], + [ + 4, + 6 + ], + [ + 6, + 4 + ] + ] + }, + { + "polygon": [ + [ + 3, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 6 + ], + [ + 3, + 6 + ] + ] + } + ], + "meta": { + "seed": 4201029, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.423253, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 27, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-026/target.png", + "shapes": { + "S1": "../images/voi-026/shape_S1.png", + "S2": "../images/voi-026/shape_S2.png" + } + }, + "ID": "voi-026", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V2", + "grid": [ + 4, + 6 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V3", + "grid": [ + 5, + 6 + ] + } + ] + }, + "legacy_answer": "S1 180 V2 [4,6]\nS2 0 V3 [5,6]", + "solutionText": "S1 180 V2 [4,6]\nS2 0 V3 [5,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-026\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-027.json b/voi/data/voi-027.json new file mode 100644 index 0000000000000000000000000000000000000000..a6dba483091e573916baa18d4d95b7ef98c2bf13 --- /dev/null +++ b/voi/data/voi-027.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 0, + 3 + ], + [ + 0, + 1 + ], + [ + 2, + 3 + ] + ] + }, + { + "polygon": [ + [ + 2, + 0 + ], + [ + 2, + 2 + ], + [ + 0, + 2 + ], + [ + 0, + 0 + ] + ] + } + ], + "meta": { + "seed": 4201030, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.423253, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 28, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-027/target.png", + "shapes": { + "S1": "../images/voi-027/shape_S1.png", + "S2": "../images/voi-027/shape_S2.png" + } + }, + "ID": "voi-027", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V3", + "grid": [ + 2, + 3 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V1", + "grid": [ + 2, + 0 + ] + } + ] + }, + "legacy_answer": "S1 90 V3 [2,3]\nS2 270 V1 [2,0]", + "solutionText": "S1 90 V3 [2,3]\nS2 270 V1 [2,0]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-027\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-028.json b/voi/data/voi-028.json new file mode 100644 index 0000000000000000000000000000000000000000..e8eba0b2cbd1f0373f28c7fb12d6cf1dae511e6d --- /dev/null +++ b/voi/data/voi-028.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 0, + 4 + ], + [ + 0, + 2 + ], + [ + 2, + 4 + ] + ] + }, + { + "polygon": [ + [ + 1, + 4 + ], + [ + 1, + 2 + ], + [ + 3, + 2 + ], + [ + 3, + 4 + ] + ] + } + ], + "meta": { + "seed": 4201031, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.423253, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 29, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-028/target.png", + "shapes": { + "S1": "../images/voi-028/shape_S1.png", + "S2": "../images/voi-028/shape_S2.png" + } + }, + "ID": "voi-028", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V1", + "grid": [ + 0, + 4 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V3", + "grid": [ + 3, + 2 + ] + } + ] + }, + "legacy_answer": "S1 90 V1 [0,4]\nS2 90 V3 [3,2]", + "solutionText": "S1 90 V1 [0,4]\nS2 90 V3 [3,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-028\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-029.json b/voi/data/voi-029.json new file mode 100644 index 0000000000000000000000000000000000000000..b437b7f1b4e15a5c5b104cc52336677a9d268bb6 --- /dev/null +++ b/voi/data/voi-029.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 1, + 1 + ], + [ + 3, + 1 + ], + [ + 3, + 3 + ], + [ + 1, + 3 + ] + ] + }, + { + "polygon": [ + [ + 1, + 4 + ], + [ + 1, + 2 + ], + [ + 3, + 4 + ] + ] + } + ], + "meta": { + "seed": 4201032, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.423253, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 30, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-029/target.png", + "shapes": { + "S1": "../images/voi-029/shape_S1.png", + "S2": "../images/voi-029/shape_S2.png" + } + }, + "ID": "voi-029", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V4", + "grid": [ + 1, + 3 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V1", + "grid": [ + 1, + 4 + ] + } + ] + }, + "legacy_answer": "S1 0 V4 [1,3]\nS2 90 V1 [1,4]", + "solutionText": "S1 0 V4 [1,3]\nS2 90 V1 [1,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-029\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-030.json b/voi/data/voi-030.json new file mode 100644 index 0000000000000000000000000000000000000000..1f9ef0fd46b730ae8058e38e6d680a893bf20a7e --- /dev/null +++ b/voi/data/voi-030.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 3 + ], + [ + 3, + 1 + ], + [ + 5, + 1 + ], + [ + 5, + 3 + ] + ] + }, + { + "polygon": [ + [ + 5, + 2 + ], + [ + 5, + 3 + ], + [ + 4, + 2 + ] + ] + } + ], + "meta": { + "seed": 4201033, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.234483, + "contourComplexity": 36, + "connectedComponents": 1, + "fillRatio": 0.096354, + "difficultyScore": 0.745223, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 31, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-030/target.png", + "shapes": { + "S1": "../images/voi-030/shape_S1.png", + "S2": "../images/voi-030/shape_S2.png" + } + }, + "ID": "voi-030", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V2", + "grid": [ + 3, + 1 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V2", + "grid": [ + 5, + 3 + ] + } + ] + }, + "legacy_answer": "S1 90 V2 [3,1]\nS2 270 V2 [5,3]", + "solutionText": "S1 90 V2 [3,1]\nS2 270 V2 [5,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-030\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-031.json b/voi/data/voi-031.json new file mode 100644 index 0000000000000000000000000000000000000000..d8925fe5506e2da83cbcae33e227c1a2ace5fcb2 --- /dev/null +++ b/voi/data/voi-031.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 1 + ], + [ + 6, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 1 + ] + ] + }, + { + "polygon": [ + [ + 5, + 1 + ], + [ + 6, + 1 + ], + [ + 5, + 2 + ] + ] + } + ], + "meta": { + "seed": 4201034, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.234483, + "contourComplexity": 36, + "connectedComponents": 1, + "fillRatio": 0.096354, + "difficultyScore": 0.745223, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 32, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-031/target.png", + "shapes": { + "S1": "../images/voi-031/shape_S1.png", + "S2": "../images/voi-031/shape_S2.png" + } + }, + "ID": "voi-031", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V4", + "grid": [ + 4, + 1 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V2", + "grid": [ + 6, + 1 + ] + } + ] + }, + "legacy_answer": "S1 270 V4 [4,1]\nS2 0 V2 [6,1]", + "solutionText": "S1 270 V4 [4,1]\nS2 0 V2 [6,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-031\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-032.json b/voi/data/voi-032.json new file mode 100644 index 0000000000000000000000000000000000000000..bee296d5b7d66deb716cbbfae251c399017448ee --- /dev/null +++ b/voi/data/voi-032.json @@ -0,0 +1,119 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 1, + 6 + ], + [ + 1, + 4 + ], + [ + 3, + 6 + ] + ] + }, + { + "polygon": [ + [ + 2, + 4 + ], + [ + 4, + 4 + ], + [ + 2, + 6 + ] + ] + } + ], + "meta": { + "seed": 4201035, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.136364, + "contourComplexity": 128, + "connectedComponents": 1, + "fillRatio": 0.098958, + "difficultyScore": 0.456629, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 33, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-032/target.png", + "shapes": { + "S1": "../images/voi-032/shape_S1.png", + "S2": "../images/voi-032/shape_S2.png" + } + }, + "ID": "voi-032", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V3", + "grid": [ + 3, + 6 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V1", + "grid": [ + 2, + 4 + ] + } + ] + }, + "legacy_answer": "S1 90 V3 [3,6]\nS2 0 V1 [2,4]", + "solutionText": "S1 90 V3 [3,6]\nS2 0 V1 [2,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-032\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-033.json b/voi/data/voi-033.json new file mode 100644 index 0000000000000000000000000000000000000000..336ea9ec4c17dc6266c1ab4160fd3e3999c1ce3f --- /dev/null +++ b/voi/data/voi-033.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 3 + ], + [ + 2, + 1 + ], + [ + 4, + 1 + ], + [ + 4, + 3 + ] + ] + }, + { + "polygon": [ + [ + 4, + 4 + ], + [ + 2, + 4 + ], + [ + 4, + 2 + ] + ] + } + ], + "meta": { + "seed": 4201036, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.423253, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 34, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-033/target.png", + "shapes": { + "S1": "../images/voi-033/shape_S1.png", + "S2": "../images/voi-033/shape_S2.png" + } + }, + "ID": "voi-033", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V2", + "grid": [ + 2, + 1 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V1", + "grid": [ + 4, + 4 + ] + } + ] + }, + "legacy_answer": "S1 90 V2 [2,1]\nS2 180 V1 [4,4]", + "solutionText": "S1 90 V2 [2,1]\nS2 180 V1 [4,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-033\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-034.json b/voi/data/voi-034.json new file mode 100644 index 0000000000000000000000000000000000000000..67bb12cdc338bfaefe266ae15856605baa9fcdc3 --- /dev/null +++ b/voi/data/voi-034.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 2 + ], + [ + 3, + 2 + ], + [ + 4, + 1 + ] + ] + }, + { + "polygon": [ + [ + 2, + 1 + ], + [ + 4, + 1 + ], + [ + 4, + 3 + ], + [ + 2, + 3 + ] + ] + } + ], + "meta": { + "seed": 4201037, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.234483, + "contourComplexity": 36, + "connectedComponents": 1, + "fillRatio": 0.096354, + "difficultyScore": 0.745223, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 35, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-034/target.png", + "shapes": { + "S1": "../images/voi-034/shape_S1.png", + "S2": "../images/voi-034/shape_S2.png" + } + }, + "ID": "voi-034", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V1", + "grid": [ + 4, + 2 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V3", + "grid": [ + 4, + 3 + ] + } + ] + }, + "legacy_answer": "S1 180 V1 [4,2]\nS2 0 V3 [4,3]", + "solutionText": "S1 180 V1 [4,2]\nS2 0 V3 [4,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-034\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-035.json b/voi/data/voi-035.json new file mode 100644 index 0000000000000000000000000000000000000000..aa174b135f6403982526c4296d3d6f99a4d42c87 --- /dev/null +++ b/voi/data/voi-035.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 0 + ], + [ + 5, + 2 + ], + [ + 3, + 2 + ], + [ + 3, + 0 + ] + ] + }, + { + "polygon": [ + [ + 2, + 0 + ], + [ + 4, + 0 + ], + [ + 2, + 2 + ] + ] + } + ], + "meta": { + "seed": 4201038, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.423253, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 36, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-035/target.png", + "shapes": { + "S1": "../images/voi-035/shape_S1.png", + "S2": "../images/voi-035/shape_S2.png" + } + }, + "ID": "voi-035", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V3", + "grid": [ + 3, + 2 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V1", + "grid": [ + 2, + 0 + ] + } + ] + }, + "legacy_answer": "S1 270 V3 [3,2]\nS2 0 V1 [2,0]", + "solutionText": "S1 270 V3 [3,2]\nS2 0 V1 [2,0]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-035\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-036.json b/voi/data/voi-036.json new file mode 100644 index 0000000000000000000000000000000000000000..252f9b4dea5607ad136d9eb5aaaa109125c14412 --- /dev/null +++ b/voi/data/voi-036.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 4 + ], + [ + 1, + 4 + ], + [ + 3, + 2 + ] + ] + }, + { + "polygon": [ + [ + 1, + 3 + ], + [ + 1, + 1 + ], + [ + 3, + 1 + ], + [ + 3, + 3 + ] + ] + } + ], + "meta": { + "seed": 4201039, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.423253, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 37, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-036/target.png", + "shapes": { + "S1": "../images/voi-036/shape_S1.png", + "S2": "../images/voi-036/shape_S2.png" + } + }, + "ID": "voi-036", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V1", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V4", + "grid": [ + 3, + 3 + ] + } + ] + }, + "legacy_answer": "S1 180 V1 [3,4]\nS2 90 V4 [3,3]", + "solutionText": "S1 180 V1 [3,4]\nS2 90 V4 [3,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-036\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-037.json b/voi/data/voi-037.json new file mode 100644 index 0000000000000000000000000000000000000000..730940bf8a7281000a74a44d7004bd9acfe82763 --- /dev/null +++ b/voi/data/voi-037.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 0 + ], + [ + 3, + 2 + ], + [ + 1, + 2 + ], + [ + 1, + 0 + ] + ] + }, + { + "polygon": [ + [ + 4, + 2 + ], + [ + 2, + 2 + ], + [ + 4, + 0 + ] + ] + } + ], + "meta": { + "seed": 4201040, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.423253, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 38, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-037/target.png", + "shapes": { + "S1": "../images/voi-037/shape_S1.png", + "S2": "../images/voi-037/shape_S2.png" + } + }, + "ID": "voi-037", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V3", + "grid": [ + 1, + 2 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V2", + "grid": [ + 2, + 2 + ] + } + ] + }, + "legacy_answer": "S1 270 V3 [1,2]\nS2 180 V2 [2,2]", + "solutionText": "S1 270 V3 [1,2]\nS2 180 V2 [2,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-037\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-038.json b/voi/data/voi-038.json new file mode 100644 index 0000000000000000000000000000000000000000..9e91a98d8989f34015c9e5244e1d4313de1a5fd3 --- /dev/null +++ b/voi/data/voi-038.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 3 + ], + [ + 0, + 3 + ], + [ + 0, + 1 + ], + [ + 2, + 1 + ] + ] + }, + { + "polygon": [ + [ + 0, + 0 + ], + [ + 2, + 0 + ], + [ + 0, + 2 + ] + ] + } + ], + "meta": { + "seed": 4201041, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.423253, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 39, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-038/target.png", + "shapes": { + "S1": "../images/voi-038/shape_S1.png", + "S2": "../images/voi-038/shape_S2.png" + } + }, + "ID": "voi-038", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V4", + "grid": [ + 2, + 1 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V3", + "grid": [ + 0, + 2 + ] + } + ] + }, + "legacy_answer": "S1 180 V4 [2,1]\nS2 0 V3 [0,2]", + "solutionText": "S1 180 V4 [2,1]\nS2 0 V3 [0,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-038\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-039.json b/voi/data/voi-039.json new file mode 100644 index 0000000000000000000000000000000000000000..cc5ba1c18b08392f624d3108e7bd080ffef343dc --- /dev/null +++ b/voi/data/voi-039.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 2 + ], + [ + 3, + 4 + ], + [ + 1, + 4 + ], + [ + 1, + 2 + ] + ] + }, + { + "polygon": [ + [ + 1, + 1 + ], + [ + 3, + 1 + ], + [ + 1, + 3 + ] + ] + } + ], + "meta": { + "seed": 4201042, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.423253, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 40, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-039/target.png", + "shapes": { + "S1": "../images/voi-039/shape_S1.png", + "S2": "../images/voi-039/shape_S2.png" + } + }, + "ID": "voi-039", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V3", + "grid": [ + 1, + 4 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V1", + "grid": [ + 1, + 1 + ] + } + ] + }, + "legacy_answer": "S1 270 V3 [1,4]\nS2 0 V1 [1,1]", + "solutionText": "S1 270 V3 [1,4]\nS2 0 V1 [1,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-039\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-040.json b/voi/data/voi-040.json new file mode 100644 index 0000000000000000000000000000000000000000..f6676facfa027019a681af0f834bb33b47776ea0 --- /dev/null +++ b/voi/data/voi-040.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 1 + ], + [ + 5, + 1 + ], + [ + 5, + 3 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 5, + 0 + ], + [ + 5, + 2 + ], + [ + 3, + 0 + ] + ] + } + ], + "meta": { + "seed": 4201043, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.423253, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 41, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-040/target.png", + "shapes": { + "S1": "../images/voi-040/shape_S1.png", + "S2": "../images/voi-040/shape_S2.png" + } + }, + "ID": "voi-040", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V3", + "grid": [ + 5, + 3 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V2", + "grid": [ + 5, + 2 + ] + } + ] + }, + "legacy_answer": "S1 0 V3 [5,3]\nS2 270 V2 [5,2]", + "solutionText": "S1 0 V3 [5,3]\nS2 270 V2 [5,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-040\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-041.json b/voi/data/voi-041.json new file mode 100644 index 0000000000000000000000000000000000000000..962ae103a364288589bea46001987acf59487088 --- /dev/null +++ b/voi/data/voi-041.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 1 + ], + [ + 6, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 1 + ] + ] + }, + { + "polygon": [ + [ + 3, + 3 + ], + [ + 3, + 1 + ], + [ + 5, + 3 + ] + ] + } + ], + "meta": { + "seed": 4201044, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.423253, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 42, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-041/target.png", + "shapes": { + "S1": "../images/voi-041/shape_S1.png", + "S2": "../images/voi-041/shape_S2.png" + } + }, + "ID": "voi-041", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V2", + "grid": [ + 6, + 3 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V2", + "grid": [ + 3, + 1 + ] + } + ] + }, + "legacy_answer": "S1 270 V2 [6,3]\nS2 90 V2 [3,1]", + "solutionText": "S1 270 V2 [6,3]\nS2 90 V2 [3,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-041\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-042.json b/voi/data/voi-042.json new file mode 100644 index 0000000000000000000000000000000000000000..c50a3ac0a7490f5464c2f6a0654b9c51f160d2e8 --- /dev/null +++ b/voi/data/voi-042.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 1, + 4 + ], + [ + 3, + 4 + ], + [ + 1, + 6 + ] + ] + }, + { + "polygon": [ + [ + 4, + 6 + ], + [ + 2, + 6 + ], + [ + 2, + 4 + ], + [ + 4, + 4 + ] + ] + } + ], + "meta": { + "seed": 4201045, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.423253, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 43, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-042/target.png", + "shapes": { + "S1": "../images/voi-042/shape_S1.png", + "S2": "../images/voi-042/shape_S2.png" + } + }, + "ID": "voi-042", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V2", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V4", + "grid": [ + 4, + 4 + ] + } + ] + }, + "legacy_answer": "S1 0 V2 [3,4]\nS2 180 V4 [4,4]", + "solutionText": "S1 0 V2 [3,4]\nS2 180 V4 [4,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-042\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-043.json b/voi/data/voi-043.json new file mode 100644 index 0000000000000000000000000000000000000000..b0f650e28e56c99ef9e1a3da074c70d17dfa33bc --- /dev/null +++ b/voi/data/voi-043.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 5 + ], + [ + 1, + 5 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 2, + 3 + ], + [ + 2, + 5 + ], + [ + 0, + 5 + ], + [ + 0, + 3 + ] + ] + } + ], + "meta": { + "seed": 4201046, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.423253, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 44, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-043/target.png", + "shapes": { + "S1": "../images/voi-043/shape_S1.png", + "S2": "../images/voi-043/shape_S2.png" + } + }, + "ID": "voi-043", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V3", + "grid": [ + 3, + 3 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V3", + "grid": [ + 0, + 5 + ] + } + ] + }, + "legacy_answer": "S1 180 V3 [3,3]\nS2 270 V3 [0,5]", + "solutionText": "S1 180 V3 [3,3]\nS2 270 V3 [0,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-043\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-044.json b/voi/data/voi-044.json new file mode 100644 index 0000000000000000000000000000000000000000..99dc9db2c85d8cc5a0c7f0836e8f4ca08a623a9f --- /dev/null +++ b/voi/data/voi-044.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 2 + ], + [ + 1, + 2 + ], + [ + 3, + 0 + ] + ] + }, + { + "polygon": [ + [ + 2, + 0 + ], + [ + 2, + 2 + ], + [ + 0, + 2 + ], + [ + 0, + 0 + ] + ] + } + ], + "meta": { + "seed": 4201047, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.423253, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 45, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-044/target.png", + "shapes": { + "S1": "../images/voi-044/shape_S1.png", + "S2": "../images/voi-044/shape_S2.png" + } + }, + "ID": "voi-044", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V3", + "grid": [ + 3, + 0 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V4", + "grid": [ + 0, + 0 + ] + } + ] + }, + "legacy_answer": "S1 180 V3 [3,0]\nS2 270 V4 [0,0]", + "solutionText": "S1 180 V3 [3,0]\nS2 270 V4 [0,0]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-044\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-045.json b/voi/data/voi-045.json new file mode 100644 index 0000000000000000000000000000000000000000..21e038bf0ad26fbf08a475d970c5ac44de2029af --- /dev/null +++ b/voi/data/voi-045.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 1, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 5 + ], + [ + 1, + 5 + ] + ] + }, + { + "polygon": [ + [ + 1, + 2 + ], + [ + 3, + 2 + ], + [ + 1, + 4 + ] + ] + } + ], + "meta": { + "seed": 4201048, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.423253, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 46, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-045/target.png", + "shapes": { + "S1": "../images/voi-045/shape_S1.png", + "S2": "../images/voi-045/shape_S2.png" + } + }, + "ID": "voi-045", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V1", + "grid": [ + 1, + 3 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V1", + "grid": [ + 1, + 2 + ] + } + ] + }, + "legacy_answer": "S1 0 V1 [1,3]\nS2 0 V1 [1,2]", + "solutionText": "S1 0 V1 [1,3]\nS2 0 V1 [1,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-045\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-046.json b/voi/data/voi-046.json new file mode 100644 index 0000000000000000000000000000000000000000..2c704eccc8c908e01b08c3540f55003156b5e543 --- /dev/null +++ b/voi/data/voi-046.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 6 + ], + [ + 4, + 6 + ], + [ + 6, + 4 + ] + ] + }, + { + "polygon": [ + [ + 4, + 3 + ], + [ + 6, + 3 + ], + [ + 6, + 5 + ], + [ + 4, + 5 + ] + ] + } + ], + "meta": { + "seed": 4201049, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.423253, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 47, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-046/target.png", + "shapes": { + "S1": "../images/voi-046/shape_S1.png", + "S2": "../images/voi-046/shape_S2.png" + } + }, + "ID": "voi-046", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V1", + "grid": [ + 6, + 6 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V4", + "grid": [ + 4, + 5 + ] + } + ] + }, + "legacy_answer": "S1 180 V1 [6,6]\nS2 0 V4 [4,5]", + "solutionText": "S1 180 V1 [6,6]\nS2 0 V4 [4,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-046\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-047.json b/voi/data/voi-047.json new file mode 100644 index 0000000000000000000000000000000000000000..9ca3a3dace4f2e85b6dfe3afcef2619f4f1a4b3c --- /dev/null +++ b/voi/data/voi-047.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 1 + ], + [ + 2, + 3 + ], + [ + 0, + 3 + ], + [ + 0, + 1 + ] + ] + }, + { + "polygon": [ + [ + 3, + 3 + ], + [ + 1, + 3 + ], + [ + 3, + 1 + ] + ] + } + ], + "meta": { + "seed": 4201050, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.423253, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 48, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-047/target.png", + "shapes": { + "S1": "../images/voi-047/shape_S1.png", + "S2": "../images/voi-047/shape_S2.png" + } + }, + "ID": "voi-047", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V1", + "grid": [ + 2, + 1 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V3", + "grid": [ + 3, + 1 + ] + } + ] + }, + "legacy_answer": "S1 270 V1 [2,1]\nS2 180 V3 [3,1]", + "solutionText": "S1 270 V1 [2,1]\nS2 180 V3 [3,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-047\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-048.json b/voi/data/voi-048.json new file mode 100644 index 0000000000000000000000000000000000000000..abc5194eedd3a9c29c14773b30a4a63222fd2b24 --- /dev/null +++ b/voi/data/voi-048.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 0, + 3 + ], + [ + 2, + 3 + ], + [ + 0, + 5 + ] + ] + }, + { + "polygon": [ + [ + 0, + 4 + ], + [ + 2, + 4 + ], + [ + 2, + 6 + ], + [ + 0, + 6 + ] + ] + } + ], + "meta": { + "seed": 4201051, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.423253, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 49, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-048/target.png", + "shapes": { + "S1": "../images/voi-048/shape_S1.png", + "S2": "../images/voi-048/shape_S2.png" + } + }, + "ID": "voi-048", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V1", + "grid": [ + 0, + 3 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V2", + "grid": [ + 2, + 4 + ] + } + ] + }, + "legacy_answer": "S1 0 V1 [0,3]\nS2 0 V2 [2,4]", + "solutionText": "S1 0 V1 [0,3]\nS2 0 V2 [2,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-048\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-049.json b/voi/data/voi-049.json new file mode 100644 index 0000000000000000000000000000000000000000..7cc9a030956e993ac86fcfc10ec2df775539efa2 --- /dev/null +++ b/voi/data/voi-049.json @@ -0,0 +1,127 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 4 + ], + [ + 5, + 6 + ], + [ + 3, + 6 + ], + [ + 3, + 4 + ] + ] + }, + { + "polygon": [ + [ + 2, + 4 + ], + [ + 4, + 4 + ], + [ + 2, + 6 + ] + ] + } + ], + "meta": { + "seed": 4201052, + "requiredShapeCount": 2, + "distractorShapeCount": 0, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.423253, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 50, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-049/target.png", + "shapes": { + "S1": "../images/voi-049/shape_S1.png", + "S2": "../images/voi-049/shape_S2.png" + } + }, + "ID": "voi-049", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V3", + "grid": [ + 3, + 6 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V2", + "grid": [ + 4, + 4 + ] + } + ] + }, + "legacy_answer": "S1 270 V3 [3,6]\nS2 0 V2 [4,4]", + "solutionText": "S1 270 V3 [3,6]\nS2 0 V2 [4,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-049\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 2\n- distractor_shapes: 0\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-050.json b/voi/data/voi-050.json new file mode 100644 index 0000000000000000000000000000000000000000..7f99d53cc344b22dc5888aa750ccf43307859dc9 --- /dev/null +++ b/voi/data/voi-050.json @@ -0,0 +1,190 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 0, + 2 + ], + [ + 2, + 2 + ], + [ + 2, + 4 + ], + [ + 0, + 4 + ] + ] + }, + { + "polygon": [ + [ + 5, + 3 + ], + [ + 5, + 5 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 4, + 5 + ], + [ + 2, + 5 + ], + [ + 2, + 3 + ], + [ + 4, + 3 + ] + ] + } + ], + "meta": { + "seed": 4202001, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.10559, + "contourComplexity": 74, + "connectedComponents": 1, + "fillRatio": 0.25, + "difficultyScore": 0.43764, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 51, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-050/target.png", + "shapes": { + "S1": "../images/voi-050/shape_S1.png", + "S2": "../images/voi-050/shape_S2.png", + "S3": "../images/voi-050/shape_S3.png", + "S4": "../images/voi-050/shape_S4.png" + } + }, + "ID": "voi-050", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V1", + "grid": [ + 0, + 2 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V2", + "grid": [ + 5, + 5 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V2", + "grid": [ + 2, + 5 + ] + } + ] + }, + "legacy_answer": "S1 0 V1 [0,2]\nS3 270 V2 [5,5]\nS4 180 V2 [2,5]", + "solutionText": "S1 0 V1 [0,2]\nS3 270 V2 [5,5]\nS4 180 V2 [2,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-050\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-051.json b/voi/data/voi-051.json new file mode 100644 index 0000000000000000000000000000000000000000..e7b013c489727d5dac636879f239ac6993e13563 --- /dev/null +++ b/voi/data/voi-051.json @@ -0,0 +1,190 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 0, + 3 + ], + [ + 2, + 3 + ], + [ + 0, + 5 + ] + ] + }, + { + "polygon": [ + [ + 1, + 5 + ], + [ + 0, + 5 + ], + [ + 0, + 4 + ], + [ + 1, + 4 + ] + ] + }, + { + "polygon": [ + [ + 1, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 6 + ], + [ + 1, + 6 + ] + ] + } + ], + "meta": { + "seed": 4202002, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.150442, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.166667, + "difficultyScore": 0.424897, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 52, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-051/target.png", + "shapes": { + "S1": "../images/voi-051/shape_S1.png", + "S2": "../images/voi-051/shape_S2.png", + "S3": "../images/voi-051/shape_S3.png", + "S4": "../images/voi-051/shape_S4.png" + } + }, + "ID": "voi-051", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 0, + "vertex": "V1", + "grid": [ + 0, + 3 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V3", + "grid": [ + 0, + 4 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V4", + "grid": [ + 1, + 6 + ] + } + ] + }, + "legacy_answer": "S2 0 V1 [0,3]\nS3 180 V3 [0,4]\nS4 0 V4 [1,6]", + "solutionText": "S2 0 V1 [0,3]\nS3 180 V3 [0,4]\nS4 0 V4 [1,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-051\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-052.json b/voi/data/voi-052.json new file mode 100644 index 0000000000000000000000000000000000000000..26b9c9e0022a8844a6fbff08c4b45d971fd3695c --- /dev/null +++ b/voi/data/voi-052.json @@ -0,0 +1,190 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 4 + ], + [ + 1, + 4 + ], + [ + 3, + 2 + ] + ] + }, + { + "polygon": [ + [ + 1, + 1 + ], + [ + 3, + 1 + ], + [ + 3, + 3 + ], + [ + 1, + 3 + ] + ] + }, + { + "polygon": [ + [ + 4, + 6 + ], + [ + 2, + 6 + ], + [ + 2, + 4 + ], + [ + 4, + 4 + ] + ] + } + ], + "meta": { + "seed": 4202003, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.10559, + "contourComplexity": 74, + "connectedComponents": 1, + "fillRatio": 0.25, + "difficultyScore": 0.43764, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 53, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-052/target.png", + "shapes": { + "S1": "../images/voi-052/shape_S1.png", + "S2": "../images/voi-052/shape_S2.png", + "S3": "../images/voi-052/shape_S3.png", + "S4": "../images/voi-052/shape_S4.png" + } + }, + "ID": "voi-052", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 180, + "vertex": "V3", + "grid": [ + 3, + 2 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V1", + "grid": [ + 1, + 1 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V2", + "grid": [ + 2, + 6 + ] + } + ] + }, + "legacy_answer": "S2 180 V3 [3,2]\nS3 0 V1 [1,1]\nS4 180 V2 [2,6]", + "solutionText": "S2 180 V3 [3,2]\nS3 0 V1 [1,1]\nS4 180 V2 [2,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-052\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-053.json b/voi/data/voi-053.json new file mode 100644 index 0000000000000000000000000000000000000000..2b9691581f166b1af51fc959865ed77fdce2f567 --- /dev/null +++ b/voi/data/voi-053.json @@ -0,0 +1,202 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 0, + 6 + ], + [ + 0, + 4 + ], + [ + 2, + 4 + ], + [ + 2, + 6 + ] + ] + }, + { + "polygon": [ + [ + 2, + 5 + ], + [ + 2, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 5 + ] + ] + }, + { + "polygon": [ + [ + 1, + 4 + ], + [ + 1, + 2 + ], + [ + 3, + 2 + ], + [ + 3, + 4 + ] + ] + } + ], + "meta": { + "seed": 4202004, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.166667, + "contourComplexity": 14, + "connectedComponents": 1, + "fillRatio": 0.277778, + "difficultyScore": 0.137778, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 54, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-053/target.png", + "shapes": { + "S1": "../images/voi-053/shape_S1.png", + "S2": "../images/voi-053/shape_S2.png", + "S3": "../images/voi-053/shape_S3.png", + "S4": "../images/voi-053/shape_S4.png" + } + }, + "ID": "voi-053", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 90, + "vertex": "V2", + "grid": [ + 0, + 4 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V4", + "grid": [ + 4, + 5 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V2", + "grid": [ + 1, + 2 + ] + } + ] + }, + "legacy_answer": "S2 90 V2 [0,4]\nS3 90 V4 [4,5]\nS4 90 V2 [1,2]", + "solutionText": "S2 90 V2 [0,4]\nS3 90 V4 [4,5]\nS4 90 V2 [1,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-053\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-054.json b/voi/data/voi-054.json new file mode 100644 index 0000000000000000000000000000000000000000..bea6d806f5ec7a01d6e81e35d9116f647a938b55 --- /dev/null +++ b/voi/data/voi-054.json @@ -0,0 +1,194 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 3 + ], + [ + 4, + 4 + ], + [ + 2, + 4 + ], + [ + 2, + 3 + ] + ] + }, + { + "polygon": [ + [ + 3, + 4 + ], + [ + 2, + 4 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 4, + 1 + ], + [ + 4, + 3 + ], + [ + 2, + 3 + ], + [ + 2, + 1 + ] + ] + } + ], + "meta": { + "seed": 4202005, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.162679, + "contourComplexity": 36, + "connectedComponents": 1, + "fillRatio": 0.15191, + "difficultyScore": 0.405463, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 55, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-054/target.png", + "shapes": { + "S1": "../images/voi-054/shape_S1.png", + "S2": "../images/voi-054/shape_S2.png", + "S3": "../images/voi-054/shape_S3.png", + "S4": "../images/voi-054/shape_S4.png" + } + }, + "ID": "voi-054", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V4", + "grid": [ + 2, + 3 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V2", + "grid": [ + 2, + 4 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V1", + "grid": [ + 4, + 1 + ] + } + ] + }, + "legacy_answer": "S1 270 V4 [2,3]\nS2 180 V2 [2,4]\nS4 270 V1 [4,1]", + "solutionText": "S1 270 V4 [2,3]\nS2 180 V2 [2,4]\nS4 270 V1 [4,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-054\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-055.json b/voi/data/voi-055.json new file mode 100644 index 0000000000000000000000000000000000000000..883119e932aba8caf7e052d96a8c5135a8c19775 --- /dev/null +++ b/voi/data/voi-055.json @@ -0,0 +1,186 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 6 + ], + [ + 4, + 4 + ], + [ + 6, + 4 + ], + [ + 6, + 6 + ] + ] + }, + { + "polygon": [ + [ + 4, + 6 + ], + [ + 4, + 5 + ], + [ + 5, + 6 + ] + ] + }, + { + "polygon": [ + [ + 4, + 2 + ], + [ + 6, + 2 + ], + [ + 4, + 4 + ] + ] + } + ], + "meta": { + "seed": 4202006, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.161137, + "contourComplexity": 100, + "connectedComponents": 1, + "fillRatio": 0.153646, + "difficultyScore": 0.408159, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 56, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-055/target.png", + "shapes": { + "S1": "../images/voi-055/shape_S1.png", + "S2": "../images/voi-055/shape_S2.png", + "S3": "../images/voi-055/shape_S3.png", + "S4": "../images/voi-055/shape_S4.png" + } + }, + "ID": "voi-055", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V3", + "grid": [ + 6, + 4 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V1", + "grid": [ + 4, + 6 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V1", + "grid": [ + 4, + 2 + ] + } + ] + }, + "legacy_answer": "S1 90 V3 [6,4]\nS2 90 V1 [4,6]\nS3 0 V1 [4,2]", + "solutionText": "S1 90 V3 [6,4]\nS2 90 V1 [4,6]\nS3 0 V1 [4,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-055\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-056.json b/voi/data/voi-056.json new file mode 100644 index 0000000000000000000000000000000000000000..3e041006201169889cc376bb48cc3ad027ebe1ee --- /dev/null +++ b/voi/data/voi-056.json @@ -0,0 +1,186 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 1 + ], + [ + 5, + 2 + ], + [ + 4, + 1 + ] + ] + }, + { + "polygon": [ + [ + 6, + 1 + ], + [ + 6, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 1 + ] + ] + }, + { + "polygon": [ + [ + 6, + 1 + ], + [ + 5, + 1 + ], + [ + 6, + 0 + ] + ] + } + ], + "meta": { + "seed": 4202007, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.209877, + "contourComplexity": 66, + "connectedComponents": 1, + "fillRatio": 0.111111, + "difficultyScore": 0.457284, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 57, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-056/target.png", + "shapes": { + "S1": "../images/voi-056/shape_S1.png", + "S2": "../images/voi-056/shape_S2.png", + "S3": "../images/voi-056/shape_S3.png", + "S4": "../images/voi-056/shape_S4.png" + } + }, + "ID": "voi-056", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V2", + "grid": [ + 5, + 2 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V3", + "grid": [ + 4, + 3 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V2", + "grid": [ + 5, + 1 + ] + } + ] + }, + "legacy_answer": "S1 270 V2 [5,2]\nS3 270 V3 [4,3]\nS4 180 V2 [5,1]", + "solutionText": "S1 270 V2 [5,2]\nS3 270 V3 [4,3]\nS4 180 V2 [5,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-056\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-057.json b/voi/data/voi-057.json new file mode 100644 index 0000000000000000000000000000000000000000..797d1a220d5356b007b4ca59aa035894b225cd47 --- /dev/null +++ b/voi/data/voi-057.json @@ -0,0 +1,186 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 2 + ], + [ + 4, + 2 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 3, + 2 + ], + [ + 3, + 4 + ], + [ + 1, + 4 + ], + [ + 1, + 2 + ] + ] + }, + { + "polygon": [ + [ + 1, + 1 + ], + [ + 3, + 1 + ], + [ + 1, + 3 + ] + ] + } + ], + "meta": { + "seed": 4202008, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.161137, + "contourComplexity": 102, + "connectedComponents": 1, + "fillRatio": 0.153646, + "difficultyScore": 0.408159, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 58, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-057/target.png", + "shapes": { + "S1": "../images/voi-057/shape_S1.png", + "S2": "../images/voi-057/shape_S2.png", + "S3": "../images/voi-057/shape_S3.png", + "S4": "../images/voi-057/shape_S4.png" + } + }, + "ID": "voi-057", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V2", + "grid": [ + 4, + 2 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V4", + "grid": [ + 1, + 2 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V3", + "grid": [ + 1, + 3 + ] + } + ] + }, + "legacy_answer": "S1 0 V2 [4,2]\nS2 270 V4 [1,2]\nS3 0 V3 [1,3]", + "solutionText": "S1 0 V2 [4,2]\nS2 270 V4 [1,2]\nS3 0 V3 [1,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-057\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-058.json b/voi/data/voi-058.json new file mode 100644 index 0000000000000000000000000000000000000000..e2a25813db3c1cc5e3403f265100e01c35795849 --- /dev/null +++ b/voi/data/voi-058.json @@ -0,0 +1,186 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 3 + ], + [ + 4, + 3 + ], + [ + 2, + 5 + ] + ] + }, + { + "polygon": [ + [ + 3, + 2 + ], + [ + 5, + 2 + ], + [ + 5, + 3 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 2, + 5 + ], + [ + 2, + 4 + ], + [ + 3, + 5 + ] + ] + } + ], + "meta": { + "seed": 4202009, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.122449, + "contourComplexity": 98, + "connectedComponents": 1, + "fillRatio": 0.111979, + "difficultyScore": 0.646246, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 59, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-058/target.png", + "shapes": { + "S1": "../images/voi-058/shape_S1.png", + "S2": "../images/voi-058/shape_S2.png", + "S3": "../images/voi-058/shape_S3.png", + "S4": "../images/voi-058/shape_S4.png" + } + }, + "ID": "voi-058", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V1", + "grid": [ + 2, + 3 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V1", + "grid": [ + 3, + 2 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V2", + "grid": [ + 2, + 4 + ] + } + ] + }, + "legacy_answer": "S1 0 V1 [2,3]\nS2 0 V1 [3,2]\nS3 90 V2 [2,4]", + "solutionText": "S1 0 V1 [2,3]\nS2 0 V1 [3,2]\nS3 90 V2 [2,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-058\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[1,0], V3=[0,1]\n- S4: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-059.json b/voi/data/voi-059.json new file mode 100644 index 0000000000000000000000000000000000000000..4145e0216ffe4ee29a8ed9310c4b4c4c77d289f2 --- /dev/null +++ b/voi/data/voi-059.json @@ -0,0 +1,186 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 5 + ], + [ + 2, + 5 + ], + [ + 4, + 3 + ] + ] + }, + { + "polygon": [ + [ + 5, + 2 + ], + [ + 5, + 4 + ], + [ + 3, + 2 + ] + ] + }, + { + "polygon": [ + [ + 5, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 3 + ], + [ + 5, + 3 + ] + ] + } + ], + "meta": { + "seed": 4202010, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.173469, + "contourComplexity": 130, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.384872, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 60, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-059/target.png", + "shapes": { + "S1": "../images/voi-059/shape_S1.png", + "S2": "../images/voi-059/shape_S2.png", + "S3": "../images/voi-059/shape_S3.png", + "S4": "../images/voi-059/shape_S4.png" + } + }, + "ID": "voi-059", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V3", + "grid": [ + 4, + 3 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V3", + "grid": [ + 3, + 2 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V3", + "grid": [ + 4, + 3 + ] + } + ] + }, + "legacy_answer": "S1 180 V3 [4,3]\nS2 270 V3 [3,2]\nS3 180 V3 [4,3]", + "solutionText": "S1 180 V3 [4,3]\nS2 270 V3 [3,2]\nS3 180 V3 [4,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-059\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-060.json b/voi/data/voi-060.json new file mode 100644 index 0000000000000000000000000000000000000000..dd062a20340133d487e6ad5af13bab472fb7e63a --- /dev/null +++ b/voi/data/voi-060.json @@ -0,0 +1,198 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 6 + ], + [ + 3, + 6 + ] + ] + }, + { + "polygon": [ + [ + 5, + 3 + ], + [ + 5, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 3 + ] + ] + }, + { + "polygon": [ + [ + 3, + 4 + ], + [ + 3, + 2 + ], + [ + 4, + 2 + ], + [ + 4, + 4 + ] + ] + } + ], + "meta": { + "seed": 4202011, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.25, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.166667, + "difficultyScore": 0.506667, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 61, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-060/target.png", + "shapes": { + "S1": "../images/voi-060/shape_S1.png", + "S2": "../images/voi-060/shape_S2.png", + "S3": "../images/voi-060/shape_S3.png", + "S4": "../images/voi-060/shape_S4.png" + } + }, + "ID": "voi-060", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V3", + "grid": [ + 5, + 6 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V4", + "grid": [ + 4, + 3 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V1", + "grid": [ + 3, + 4 + ] + } + ] + }, + "legacy_answer": "S1 0 V3 [5,6]\nS3 270 V4 [4,3]\nS4 90 V1 [3,4]", + "solutionText": "S1 0 V3 [5,6]\nS3 270 V4 [4,3]\nS4 90 V1 [3,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-060\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-061.json b/voi/data/voi-061.json new file mode 100644 index 0000000000000000000000000000000000000000..6381434bd3566b2b85b97b2341c956b87b231ab4 --- /dev/null +++ b/voi/data/voi-061.json @@ -0,0 +1,198 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 4 + ], + [ + 3, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 4 + ] + ] + }, + { + "polygon": [ + [ + 4, + 5 + ], + [ + 2, + 5 + ], + [ + 2, + 3 + ], + [ + 4, + 3 + ] + ] + }, + { + "polygon": [ + [ + 6, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 3 + ], + [ + 6, + 3 + ] + ] + } + ], + "meta": { + "seed": 4202012, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "contourComplexity": 8, + "connectedComponents": 1, + "fillRatio": 0.194444, + "difficultyScore": 0.34, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 62, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-061/target.png", + "shapes": { + "S1": "../images/voi-061/shape_S1.png", + "S2": "../images/voi-061/shape_S2.png", + "S3": "../images/voi-061/shape_S3.png", + "S4": "../images/voi-061/shape_S4.png" + } + }, + "ID": "voi-061", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V2", + "grid": [ + 3, + 3 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V3", + "grid": [ + 2, + 3 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V2", + "grid": [ + 4, + 5 + ] + } + ] + }, + "legacy_answer": "S1 90 V2 [3,3]\nS3 180 V3 [2,3]\nS4 180 V2 [4,5]", + "solutionText": "S1 90 V2 [3,3]\nS3 180 V3 [2,3]\nS4 180 V2 [4,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-061\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S2: V1=[0,0], V2=[1,0], V3=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-062.json b/voi/data/voi-062.json new file mode 100644 index 0000000000000000000000000000000000000000..d76976e575ee145b264fb9fdab363d45a2027bdf --- /dev/null +++ b/voi/data/voi-062.json @@ -0,0 +1,190 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 3 + ], + [ + 3, + 1 + ], + [ + 5, + 1 + ], + [ + 5, + 3 + ] + ] + }, + { + "polygon": [ + [ + 1, + 1 + ], + [ + 3, + 1 + ], + [ + 3, + 2 + ], + [ + 1, + 2 + ] + ] + }, + { + "polygon": [ + [ + 3, + 4 + ], + [ + 3, + 2 + ], + [ + 5, + 4 + ] + ] + } + ], + "meta": { + "seed": 4202013, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.131783, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.194444, + "difficultyScore": 0.443979, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 63, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-062/target.png", + "shapes": { + "S1": "../images/voi-062/shape_S1.png", + "S2": "../images/voi-062/shape_S2.png", + "S3": "../images/voi-062/shape_S3.png", + "S4": "../images/voi-062/shape_S4.png" + } + }, + "ID": "voi-062", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V3", + "grid": [ + 5, + 1 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V3", + "grid": [ + 3, + 2 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V2", + "grid": [ + 3, + 2 + ] + } + ] + }, + "legacy_answer": "S1 90 V3 [5,1]\nS2 0 V3 [3,2]\nS3 90 V2 [3,2]", + "solutionText": "S1 90 V3 [5,1]\nS2 0 V3 [3,2]\nS3 90 V2 [3,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-062\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-063.json b/voi/data/voi-063.json new file mode 100644 index 0000000000000000000000000000000000000000..8103a41a5be72a7230fe181e949f4f2240ed485c --- /dev/null +++ b/voi/data/voi-063.json @@ -0,0 +1,190 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 2 + ], + [ + 4, + 4 + ], + [ + 2, + 2 + ] + ] + }, + { + "polygon": [ + [ + 6, + 2 + ], + [ + 6, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 2 + ] + ] + }, + { + "polygon": [ + [ + 3, + 2 + ], + [ + 3, + 4 + ], + [ + 2, + 4 + ], + [ + 2, + 2 + ] + ] + } + ], + "meta": { + "seed": 4202014, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.381191, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 64, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-063/target.png", + "shapes": { + "S1": "../images/voi-063/shape_S1.png", + "S2": "../images/voi-063/shape_S2.png", + "S3": "../images/voi-063/shape_S3.png", + "S4": "../images/voi-063/shape_S4.png" + } + }, + "ID": "voi-063", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 270, + "vertex": "V1", + "grid": [ + 4, + 2 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V3", + "grid": [ + 4, + 3 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V4", + "grid": [ + 2, + 2 + ] + } + ] + }, + "legacy_answer": "S2 270 V1 [4,2]\nS3 270 V3 [4,3]\nS4 270 V4 [2,2]", + "solutionText": "S2 270 V1 [4,2]\nS3 270 V3 [4,3]\nS4 270 V4 [2,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-063\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-064.json b/voi/data/voi-064.json new file mode 100644 index 0000000000000000000000000000000000000000..1f21e7fa8feb95633a985752f5e56905f29627b3 --- /dev/null +++ b/voi/data/voi-064.json @@ -0,0 +1,190 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 0 + ], + [ + 4, + 0 + ], + [ + 4, + 2 + ], + [ + 2, + 2 + ] + ] + }, + { + "polygon": [ + [ + 4, + 3 + ], + [ + 4, + 5 + ], + [ + 2, + 5 + ], + [ + 2, + 3 + ] + ] + }, + { + "polygon": [ + [ + 4, + 2 + ], + [ + 4, + 4 + ], + [ + 2, + 2 + ] + ] + } + ], + "meta": { + "seed": 4202015, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.10559, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.25, + "difficultyScore": 0.43764, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 65, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-064/target.png", + "shapes": { + "S1": "../images/voi-064/shape_S1.png", + "S2": "../images/voi-064/shape_S2.png", + "S3": "../images/voi-064/shape_S3.png", + "S4": "../images/voi-064/shape_S4.png" + } + }, + "ID": "voi-064", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V4", + "grid": [ + 2, + 2 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V4", + "grid": [ + 2, + 3 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V2", + "grid": [ + 4, + 4 + ] + } + ] + }, + "legacy_answer": "S1 0 V4 [2,2]\nS3 270 V4 [2,3]\nS4 270 V2 [4,4]", + "solutionText": "S1 0 V4 [2,2]\nS3 270 V4 [2,3]\nS4 270 V2 [4,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-064\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-065.json b/voi/data/voi-065.json new file mode 100644 index 0000000000000000000000000000000000000000..d09e4271d4c4cbc7aef096d69e385fd0ed4f21da --- /dev/null +++ b/voi/data/voi-065.json @@ -0,0 +1,194 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 3 + ], + [ + 3, + 1 + ], + [ + 4, + 1 + ], + [ + 4, + 3 + ] + ] + }, + { + "polygon": [ + [ + 2, + 3 + ], + [ + 2, + 2 + ], + [ + 3, + 2 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 2, + 4 + ], + [ + 2, + 2 + ], + [ + 4, + 4 + ] + ] + } + ], + "meta": { + "seed": 4202016, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.209877, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.111111, + "difficultyScore": 0.457284, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 66, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-065/target.png", + "shapes": { + "S1": "../images/voi-065/shape_S1.png", + "S2": "../images/voi-065/shape_S2.png", + "S3": "../images/voi-065/shape_S3.png", + "S4": "../images/voi-065/shape_S4.png" + } + }, + "ID": "voi-065", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 90, + "vertex": "V4", + "grid": [ + 4, + 3 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V3", + "grid": [ + 3, + 2 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V3", + "grid": [ + 4, + 4 + ] + } + ] + }, + "legacy_answer": "S2 90 V4 [4,3]\nS3 90 V3 [3,2]\nS4 90 V3 [4,4]", + "solutionText": "S2 90 V4 [4,3]\nS3 90 V3 [3,2]\nS4 90 V3 [4,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-065\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-066.json b/voi/data/voi-066.json new file mode 100644 index 0000000000000000000000000000000000000000..02752ae8c28c7e583164dc4412dd2d3ce1f8fdb4 --- /dev/null +++ b/voi/data/voi-066.json @@ -0,0 +1,194 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 1 + ], + [ + 5, + 1 + ] + ] + }, + { + "polygon": [ + [ + 4, + 2 + ], + [ + 6, + 2 + ], + [ + 6, + 4 + ], + [ + 4, + 4 + ] + ] + }, + { + "polygon": [ + [ + 4, + 5 + ], + [ + 2, + 5 + ], + [ + 4, + 3 + ] + ] + } + ], + "meta": { + "seed": 4202017, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.198758, + "contourComplexity": 76, + "connectedComponents": 1, + "fillRatio": 0.223958, + "difficultyScore": 0.187114, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 67, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-066/target.png", + "shapes": { + "S1": "../images/voi-066/shape_S1.png", + "S2": "../images/voi-066/shape_S2.png", + "S3": "../images/voi-066/shape_S3.png", + "S4": "../images/voi-066/shape_S4.png" + } + }, + "ID": "voi-066", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V3", + "grid": [ + 3, + 1 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V4", + "grid": [ + 4, + 4 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V3", + "grid": [ + 4, + 3 + ] + } + ] + }, + "legacy_answer": "S1 180 V3 [3,1]\nS2 0 V4 [4,4]\nS3 180 V3 [4,3]", + "solutionText": "S1 180 V3 [3,1]\nS2 0 V4 [4,4]\nS3 180 V3 [4,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-066\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-067.json b/voi/data/voi-067.json new file mode 100644 index 0000000000000000000000000000000000000000..0976dadf4bfb083875984d5e4af0e7f0be9813eb --- /dev/null +++ b/voi/data/voi-067.json @@ -0,0 +1,198 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 5 + ], + [ + 2, + 5 + ], + [ + 2, + 4 + ], + [ + 3, + 4 + ] + ] + }, + { + "polygon": [ + [ + 3, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 6 + ], + [ + 3, + 6 + ] + ] + }, + { + "polygon": [ + [ + 1, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 6 + ], + [ + 1, + 6 + ] + ] + } + ], + "meta": { + "seed": 4202018, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "contourComplexity": 8, + "connectedComponents": 1, + "fillRatio": 0.194444, + "difficultyScore": 0.34, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 68, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-067/target.png", + "shapes": { + "S1": "../images/voi-067/shape_S1.png", + "S2": "../images/voi-067/shape_S2.png", + "S3": "../images/voi-067/shape_S3.png", + "S4": "../images/voi-067/shape_S4.png" + } + }, + "ID": "voi-067", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V3", + "grid": [ + 2, + 4 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V1", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V4", + "grid": [ + 1, + 6 + ] + } + ] + }, + "legacy_answer": "S1 180 V3 [2,4]\nS3 0 V1 [3,4]\nS4 0 V4 [1,6]", + "solutionText": "S1 180 V3 [2,4]\nS3 0 V1 [3,4]\nS4 0 V4 [1,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-067\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S2: V1=[0,0], V2=[1,0], V3=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-068.json b/voi/data/voi-068.json new file mode 100644 index 0000000000000000000000000000000000000000..3ebc28ae42bf4760347239262b6b4d298f92e3c3 --- /dev/null +++ b/voi/data/voi-068.json @@ -0,0 +1,186 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 6 + ], + [ + 3, + 6 + ], + [ + 5, + 4 + ] + ] + }, + { + "polygon": [ + [ + 4, + 5 + ], + [ + 2, + 5 + ], + [ + 4, + 3 + ] + ] + }, + { + "polygon": [ + [ + 6, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 3 + ], + [ + 6, + 3 + ] + ] + } + ], + "meta": { + "seed": 4202019, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.130769, + "contourComplexity": 134, + "connectedComponents": 1, + "fillRatio": 0.196181, + "difficultyScore": 0.444562, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 69, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-068/target.png", + "shapes": { + "S1": "../images/voi-068/shape_S1.png", + "S2": "../images/voi-068/shape_S2.png", + "S3": "../images/voi-068/shape_S3.png", + "S4": "../images/voi-068/shape_S4.png" + } + }, + "ID": "voi-068", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V1", + "grid": [ + 5, + 6 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V2", + "grid": [ + 2, + 5 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V3", + "grid": [ + 4, + 3 + ] + } + ] + }, + "legacy_answer": "S1 180 V1 [5,6]\nS2 180 V2 [2,5]\nS4 180 V3 [4,3]", + "solutionText": "S1 180 V1 [5,6]\nS2 180 V2 [2,5]\nS4 180 V3 [4,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-068\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-069.json b/voi/data/voi-069.json new file mode 100644 index 0000000000000000000000000000000000000000..337eb7c461ac191e8f6fe48bbca23f284b78e25d --- /dev/null +++ b/voi/data/voi-069.json @@ -0,0 +1,190 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 4 + ], + [ + 2, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 4 + ] + ] + }, + { + "polygon": [ + [ + 1, + 3 + ], + [ + 2, + 3 + ], + [ + 1, + 4 + ] + ] + }, + { + "polygon": [ + [ + 0, + 3 + ], + [ + 2, + 3 + ], + [ + 2, + 5 + ], + [ + 0, + 5 + ] + ] + } + ], + "meta": { + "seed": 4202020, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.19209, + "contourComplexity": 40, + "connectedComponents": 1, + "fillRatio": 0.124132, + "difficultyScore": 0.360098, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 70, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-069/target.png", + "shapes": { + "S1": "../images/voi-069/shape_S1.png", + "S2": "../images/voi-069/shape_S2.png", + "S3": "../images/voi-069/shape_S3.png", + "S4": "../images/voi-069/shape_S4.png" + } + }, + "ID": "voi-069", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V2", + "grid": [ + 2, + 3 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V1", + "grid": [ + 1, + 3 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V3", + "grid": [ + 2, + 5 + ] + } + ] + }, + "legacy_answer": "S1 90 V2 [2,3]\nS3 0 V1 [1,3]\nS4 0 V3 [2,5]", + "solutionText": "S1 90 V2 [2,3]\nS3 0 V1 [1,3]\nS4 0 V3 [2,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-069\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-070.json b/voi/data/voi-070.json new file mode 100644 index 0000000000000000000000000000000000000000..419bc916a75f174e67c267fcf88f8be2e32446ba --- /dev/null +++ b/voi/data/voi-070.json @@ -0,0 +1,186 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 4 + ], + [ + 1, + 4 + ], + [ + 2, + 3 + ] + ] + }, + { + "polygon": [ + [ + 4, + 3 + ], + [ + 2, + 3 + ], + [ + 2, + 1 + ], + [ + 4, + 1 + ] + ] + }, + { + "polygon": [ + [ + 2, + 4 + ], + [ + 0, + 4 + ], + [ + 2, + 2 + ] + ] + } + ], + "meta": { + "seed": 4202021, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.161137, + "contourComplexity": 100, + "connectedComponents": 1, + "fillRatio": 0.153646, + "difficultyScore": 0.408159, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 71, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-070/target.png", + "shapes": { + "S1": "../images/voi-070/shape_S1.png", + "S2": "../images/voi-070/shape_S2.png", + "S3": "../images/voi-070/shape_S3.png", + "S4": "../images/voi-070/shape_S4.png" + } + }, + "ID": "voi-070", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 180, + "vertex": "V2", + "grid": [ + 1, + 4 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V1", + "grid": [ + 4, + 3 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V2", + "grid": [ + 0, + 4 + ] + } + ] + }, + "legacy_answer": "S2 180 V2 [1,4]\nS3 180 V1 [4,3]\nS4 180 V2 [0,4]", + "solutionText": "S2 180 V2 [1,4]\nS3 180 V1 [4,3]\nS4 180 V2 [0,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-070\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[1,0], V3=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-071.json b/voi/data/voi-071.json new file mode 100644 index 0000000000000000000000000000000000000000..ffc7661336237d4a48236eefbdbac36a785d622a --- /dev/null +++ b/voi/data/voi-071.json @@ -0,0 +1,190 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 2 + ], + [ + 3, + 4 + ], + [ + 1, + 4 + ], + [ + 1, + 2 + ] + ] + }, + { + "polygon": [ + [ + 0, + 4 + ], + [ + 0, + 2 + ], + [ + 2, + 4 + ] + ] + }, + { + "polygon": [ + [ + 2, + 2 + ], + [ + 0, + 2 + ], + [ + 0, + 0 + ], + [ + 2, + 0 + ] + ] + } + ], + "meta": { + "seed": 4202022, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.10559, + "contourComplexity": 73, + "connectedComponents": 1, + "fillRatio": 0.25, + "difficultyScore": 0.43764, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 72, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-071/target.png", + "shapes": { + "S1": "../images/voi-071/shape_S1.png", + "S2": "../images/voi-071/shape_S2.png", + "S3": "../images/voi-071/shape_S3.png", + "S4": "../images/voi-071/shape_S4.png" + } + }, + "ID": "voi-071", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V2", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V3", + "grid": [ + 2, + 4 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V2", + "grid": [ + 0, + 2 + ] + } + ] + }, + "legacy_answer": "S1 270 V2 [3,4]\nS2 90 V3 [2,4]\nS3 180 V2 [0,2]", + "solutionText": "S1 270 V2 [3,4]\nS2 90 V3 [2,4]\nS3 180 V2 [0,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-071\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-072.json b/voi/data/voi-072.json new file mode 100644 index 0000000000000000000000000000000000000000..4300491af8302e6475f736b35808c53cc8ab7034 --- /dev/null +++ b/voi/data/voi-072.json @@ -0,0 +1,186 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 6 + ], + [ + 0, + 6 + ], + [ + 2, + 4 + ] + ] + }, + { + "polygon": [ + [ + 1, + 4 + ], + [ + 1, + 2 + ], + [ + 3, + 2 + ], + [ + 3, + 4 + ] + ] + }, + { + "polygon": [ + [ + 2, + 2 + ], + [ + 3, + 2 + ], + [ + 2, + 3 + ] + ] + } + ], + "meta": { + "seed": 4202023, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.161137, + "contourComplexity": 102, + "connectedComponents": 1, + "fillRatio": 0.153646, + "difficultyScore": 0.408159, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 73, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-072/target.png", + "shapes": { + "S1": "../images/voi-072/shape_S1.png", + "S2": "../images/voi-072/shape_S2.png", + "S3": "../images/voi-072/shape_S3.png", + "S4": "../images/voi-072/shape_S4.png" + } + }, + "ID": "voi-072", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V2", + "grid": [ + 0, + 6 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V4", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V1", + "grid": [ + 2, + 2 + ] + } + ] + }, + "legacy_answer": "S1 180 V2 [0,6]\nS2 90 V4 [3,4]\nS3 0 V1 [2,2]", + "solutionText": "S1 180 V2 [0,6]\nS2 90 V4 [3,4]\nS3 0 V1 [2,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-072\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-073.json b/voi/data/voi-073.json new file mode 100644 index 0000000000000000000000000000000000000000..b077fbbcba3b6289296b0ecf5b76eaf1b5ba04e9 --- /dev/null +++ b/voi/data/voi-073.json @@ -0,0 +1,202 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 4 + ], + [ + 2, + 4 + ] + ] + }, + { + "polygon": [ + [ + 1, + 0 + ], + [ + 3, + 0 + ], + [ + 3, + 2 + ], + [ + 1, + 2 + ] + ] + }, + { + "polygon": [ + [ + 2, + 4 + ], + [ + 2, + 2 + ], + [ + 4, + 2 + ], + [ + 4, + 4 + ] + ] + } + ], + "meta": { + "seed": 4202024, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.194444, + "difficultyScore": 0.34, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 74, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-073/target.png", + "shapes": { + "S1": "../images/voi-073/shape_S1.png", + "S2": "../images/voi-073/shape_S2.png", + "S3": "../images/voi-073/shape_S3.png", + "S4": "../images/voi-073/shape_S4.png" + } + }, + "ID": "voi-073", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V2", + "grid": [ + 3, + 3 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V4", + "grid": [ + 1, + 2 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V4", + "grid": [ + 4, + 4 + ] + } + ] + }, + "legacy_answer": "S1 0 V2 [3,3]\nS3 0 V4 [1,2]\nS4 90 V4 [4,4]", + "solutionText": "S1 0 V2 [3,3]\nS3 0 V4 [1,2]\nS4 90 V4 [4,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-073\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-074.json b/voi/data/voi-074.json new file mode 100644 index 0000000000000000000000000000000000000000..42a0df7bbe4ac556f4cd8eefe615e48b888e2859 --- /dev/null +++ b/voi/data/voi-074.json @@ -0,0 +1,194 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 2 + ], + [ + 4, + 2 + ], + [ + 4, + 0 + ], + [ + 6, + 0 + ] + ] + }, + { + "polygon": [ + [ + 4, + 1 + ], + [ + 4, + 3 + ], + [ + 2, + 3 + ], + [ + 2, + 1 + ] + ] + }, + { + "polygon": [ + [ + 3, + 3 + ], + [ + 3, + 2 + ], + [ + 4, + 3 + ] + ] + } + ], + "meta": { + "seed": 4202025, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.124542, + "contourComplexity": 40, + "connectedComponents": 1, + "fillRatio": 0.207465, + "difficultyScore": 0.446901, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 75, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-074/target.png", + "shapes": { + "S1": "../images/voi-074/shape_S1.png", + "S2": "../images/voi-074/shape_S2.png", + "S3": "../images/voi-074/shape_S3.png", + "S4": "../images/voi-074/shape_S4.png" + } + }, + "ID": "voi-074", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 180, + "vertex": "V4", + "grid": [ + 6, + 0 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V4", + "grid": [ + 2, + 1 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V1", + "grid": [ + 3, + 3 + ] + } + ] + }, + "legacy_answer": "S2 180 V4 [6,0]\nS3 270 V4 [2,1]\nS4 90 V1 [3,3]", + "solutionText": "S2 180 V4 [6,0]\nS3 270 V4 [2,1]\nS4 90 V1 [3,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-074\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-075.json b/voi/data/voi-075.json new file mode 100644 index 0000000000000000000000000000000000000000..7dac816c650174d44a75f335e94cd3a54023ab48 --- /dev/null +++ b/voi/data/voi-075.json @@ -0,0 +1,182 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 4 + ], + [ + 4, + 5 + ], + [ + 2, + 5 + ], + [ + 2, + 4 + ] + ] + }, + { + "polygon": [ + [ + 2, + 2 + ], + [ + 4, + 2 + ], + [ + 2, + 4 + ] + ] + }, + { + "polygon": [ + [ + 1, + 2 + ], + [ + 3, + 2 + ], + [ + 1, + 4 + ] + ] + } + ], + "meta": { + "seed": 4202026, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.173469, + "contourComplexity": 134, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.384872, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 76, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-075/target.png", + "shapes": { + "S1": "../images/voi-075/shape_S1.png", + "S2": "../images/voi-075/shape_S2.png", + "S3": "../images/voi-075/shape_S3.png", + "S4": "../images/voi-075/shape_S4.png" + } + }, + "ID": "voi-075", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V4", + "grid": [ + 2, + 4 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V1", + "grid": [ + 2, + 2 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V1", + "grid": [ + 1, + 2 + ] + } + ] + }, + "legacy_answer": "S1 270 V4 [2,4]\nS2 0 V1 [2,2]\nS3 0 V1 [1,2]", + "solutionText": "S1 270 V4 [2,4]\nS2 0 V1 [2,2]\nS3 0 V1 [1,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-075\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-076.json b/voi/data/voi-076.json new file mode 100644 index 0000000000000000000000000000000000000000..1e347b417d8b7573ce529cd891b80606365340b5 --- /dev/null +++ b/voi/data/voi-076.json @@ -0,0 +1,186 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 5 + ], + [ + 2, + 3 + ], + [ + 4, + 5 + ] + ] + }, + { + "polygon": [ + [ + 3, + 3 + ], + [ + 1, + 3 + ], + [ + 3, + 1 + ] + ] + }, + { + "polygon": [ + [ + 4, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 3 + ], + [ + 4, + 3 + ] + ] + } + ], + "meta": { + "seed": 4202027, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.173469, + "contourComplexity": 134, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.384872, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 77, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-076/target.png", + "shapes": { + "S1": "../images/voi-076/shape_S1.png", + "S2": "../images/voi-076/shape_S2.png", + "S3": "../images/voi-076/shape_S3.png", + "S4": "../images/voi-076/shape_S4.png" + } + }, + "ID": "voi-076", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V2", + "grid": [ + 2, + 3 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V1", + "grid": [ + 3, + 3 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V3", + "grid": [ + 3, + 3 + ] + } + ] + }, + "legacy_answer": "S1 90 V2 [2,3]\nS3 180 V1 [3,3]\nS4 180 V3 [3,3]", + "solutionText": "S1 90 V2 [2,3]\nS3 180 V1 [3,3]\nS4 180 V3 [3,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-076\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-077.json b/voi/data/voi-077.json new file mode 100644 index 0000000000000000000000000000000000000000..689175dcc36a58e4d5017e7965f760d64d73da3a --- /dev/null +++ b/voi/data/voi-077.json @@ -0,0 +1,202 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 5 + ], + [ + 1, + 5 + ], + [ + 1, + 3 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 4, + 2 + ], + [ + 3, + 2 + ], + [ + 3, + 1 + ], + [ + 4, + 1 + ] + ] + }, + { + "polygon": [ + [ + 2, + 1 + ], + [ + 4, + 1 + ], + [ + 4, + 3 + ], + [ + 2, + 3 + ] + ] + } + ], + "meta": { + "seed": 4202028, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.194444, + "difficultyScore": 0.34, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 78, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-077/target.png", + "shapes": { + "S1": "../images/voi-077/shape_S1.png", + "S2": "../images/voi-077/shape_S2.png", + "S3": "../images/voi-077/shape_S3.png", + "S4": "../images/voi-077/shape_S4.png" + } + }, + "ID": "voi-077", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 180, + "vertex": "V1", + "grid": [ + 3, + 5 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V1", + "grid": [ + 4, + 2 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V2", + "grid": [ + 4, + 1 + ] + } + ] + }, + "legacy_answer": "S2 180 V1 [3,5]\nS3 180 V1 [4,2]\nS4 0 V2 [4,1]", + "solutionText": "S2 180 V1 [3,5]\nS3 180 V1 [4,2]\nS4 0 V2 [4,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-077\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-078.json b/voi/data/voi-078.json new file mode 100644 index 0000000000000000000000000000000000000000..50e1de1b411775c7c77a08a6c27fd98fb58ad37a --- /dev/null +++ b/voi/data/voi-078.json @@ -0,0 +1,194 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 1, + 1 + ], + [ + 3, + 1 + ], + [ + 3, + 3 + ], + [ + 1, + 3 + ] + ] + }, + { + "polygon": [ + [ + 1, + 4 + ], + [ + 1, + 2 + ], + [ + 3, + 4 + ] + ] + }, + { + "polygon": [ + [ + 3, + 4 + ], + [ + 3, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 4 + ] + ] + } + ], + "meta": { + "seed": 4202029, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.150442, + "contourComplexity": 72, + "connectedComponents": 1, + "fillRatio": 0.166667, + "difficultyScore": 0.424897, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 79, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-078/target.png", + "shapes": { + "S1": "../images/voi-078/shape_S1.png", + "S2": "../images/voi-078/shape_S2.png", + "S3": "../images/voi-078/shape_S3.png", + "S4": "../images/voi-078/shape_S4.png" + } + }, + "ID": "voi-078", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V3", + "grid": [ + 3, + 3 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V1", + "grid": [ + 1, + 4 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V4", + "grid": [ + 4, + 4 + ] + } + ] + }, + "legacy_answer": "S1 0 V3 [3,3]\nS2 90 V1 [1,4]\nS3 90 V4 [4,4]", + "solutionText": "S1 0 V3 [3,3]\nS2 90 V1 [1,4]\nS3 90 V4 [4,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-078\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-079.json b/voi/data/voi-079.json new file mode 100644 index 0000000000000000000000000000000000000000..cc01fbabb1dbb5304cc012b16b144986f48b6896 --- /dev/null +++ b/voi/data/voi-079.json @@ -0,0 +1,186 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 1, + 2 + ], + [ + 2, + 2 + ], + [ + 1, + 3 + ] + ] + }, + { + "polygon": [ + [ + 5, + 2 + ], + [ + 5, + 4 + ], + [ + 3, + 2 + ] + ] + }, + { + "polygon": [ + [ + 1, + 4 + ], + [ + 1, + 2 + ], + [ + 3, + 2 + ], + [ + 3, + 4 + ] + ] + } + ], + "meta": { + "seed": 4202030, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.161137, + "contourComplexity": 100, + "connectedComponents": 1, + "fillRatio": 0.153646, + "difficultyScore": 0.408159, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 80, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-079/target.png", + "shapes": { + "S1": "../images/voi-079/shape_S1.png", + "S2": "../images/voi-079/shape_S2.png", + "S3": "../images/voi-079/shape_S3.png", + "S4": "../images/voi-079/shape_S4.png" + } + }, + "ID": "voi-079", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 0, + "vertex": "V1", + "grid": [ + 1, + 2 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V2", + "grid": [ + 5, + 4 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V2", + "grid": [ + 1, + 2 + ] + } + ] + }, + "legacy_answer": "S2 0 V1 [1,2]\nS3 270 V2 [5,4]\nS4 90 V2 [1,2]", + "solutionText": "S2 0 V1 [1,2]\nS3 270 V2 [5,4]\nS4 90 V2 [1,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-079\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S2: V1=[0,0], V2=[1,0], V3=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-080.json b/voi/data/voi-080.json new file mode 100644 index 0000000000000000000000000000000000000000..87c882d1fec9b23e3b07bede40e614e407923f09 --- /dev/null +++ b/voi/data/voi-080.json @@ -0,0 +1,190 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 4 + ], + [ + 4, + 2 + ], + [ + 6, + 2 + ], + [ + 6, + 4 + ] + ] + }, + { + "polygon": [ + [ + 5, + 0 + ], + [ + 5, + 2 + ], + [ + 3, + 0 + ] + ] + }, + { + "polygon": [ + [ + 4, + 0 + ], + [ + 4, + 2 + ], + [ + 3, + 2 + ], + [ + 3, + 0 + ] + ] + } + ], + "meta": { + "seed": 4202031, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.131783, + "contourComplexity": 72, + "connectedComponents": 1, + "fillRatio": 0.194444, + "difficultyScore": 0.443979, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 81, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-080/target.png", + "shapes": { + "S1": "../images/voi-080/shape_S1.png", + "S2": "../images/voi-080/shape_S2.png", + "S3": "../images/voi-080/shape_S3.png", + "S4": "../images/voi-080/shape_S4.png" + } + }, + "ID": "voi-080", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V1", + "grid": [ + 4, + 4 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V2", + "grid": [ + 5, + 2 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V4", + "grid": [ + 3, + 0 + ] + } + ] + }, + "legacy_answer": "S1 90 V1 [4,4]\nS3 270 V2 [5,2]\nS4 270 V4 [3,0]", + "solutionText": "S1 90 V1 [4,4]\nS3 270 V2 [5,2]\nS4 270 V4 [3,0]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-080\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-081.json b/voi/data/voi-081.json new file mode 100644 index 0000000000000000000000000000000000000000..c9ac53fac2784cc0b89085ca9f1a16e348c91d0a --- /dev/null +++ b/voi/data/voi-081.json @@ -0,0 +1,178 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 0, + 1 + ], + [ + 2, + 1 + ], + [ + 0, + 3 + ] + ] + }, + { + "polygon": [ + [ + 0, + 2 + ], + [ + 2, + 2 + ], + [ + 0, + 4 + ] + ] + }, + { + "polygon": [ + [ + 2, + 0 + ], + [ + 4, + 0 + ], + [ + 2, + 2 + ] + ] + } + ], + "meta": { + "seed": 4202032, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.171717, + "contourComplexity": 198, + "connectedComponents": 1, + "fillRatio": 0.142361, + "difficultyScore": 0.388409, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 82, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-081/target.png", + "shapes": { + "S1": "../images/voi-081/shape_S1.png", + "S2": "../images/voi-081/shape_S2.png", + "S3": "../images/voi-081/shape_S3.png", + "S4": "../images/voi-081/shape_S4.png" + } + }, + "ID": "voi-081", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V3", + "grid": [ + 0, + 3 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V2", + "grid": [ + 2, + 2 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V2", + "grid": [ + 4, + 0 + ] + } + ] + }, + "legacy_answer": "S1 0 V3 [0,3]\nS2 0 V2 [2,2]\nS4 0 V2 [4,0]", + "solutionText": "S1 0 V3 [0,3]\nS2 0 V2 [2,2]\nS4 0 V2 [4,0]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-081\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-082.json b/voi/data/voi-082.json new file mode 100644 index 0000000000000000000000000000000000000000..cff6bf4843ca539c1802f1585db8075303fc23e4 --- /dev/null +++ b/voi/data/voi-082.json @@ -0,0 +1,182 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 6 + ], + [ + 3, + 4 + ], + [ + 5, + 6 + ] + ] + }, + { + "polygon": [ + [ + 4, + 3 + ], + [ + 3, + 3 + ], + [ + 4, + 2 + ] + ] + }, + { + "polygon": [ + [ + 2, + 4 + ], + [ + 2, + 2 + ], + [ + 4, + 2 + ], + [ + 4, + 4 + ] + ] + } + ], + "meta": { + "seed": 4202033, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.161137, + "contourComplexity": 102, + "connectedComponents": 1, + "fillRatio": 0.153646, + "difficultyScore": 0.408159, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 83, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-082/target.png", + "shapes": { + "S1": "../images/voi-082/shape_S1.png", + "S2": "../images/voi-082/shape_S2.png", + "S3": "../images/voi-082/shape_S3.png", + "S4": "../images/voi-082/shape_S4.png" + } + }, + "ID": "voi-082", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 90, + "vertex": "V1", + "grid": [ + 3, + 6 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V3", + "grid": [ + 4, + 2 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V1", + "grid": [ + 2, + 4 + ] + } + ] + }, + "legacy_answer": "S2 90 V1 [3,6]\nS3 180 V3 [4,2]\nS4 90 V1 [2,4]", + "solutionText": "S2 90 V1 [3,6]\nS3 180 V3 [4,2]\nS4 90 V1 [2,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-082\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-083.json b/voi/data/voi-083.json new file mode 100644 index 0000000000000000000000000000000000000000..986d539a1008e057d39077860ff598bb11e1a528 --- /dev/null +++ b/voi/data/voi-083.json @@ -0,0 +1,178 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 1 + ], + [ + 5, + 3 + ], + [ + 3, + 1 + ] + ] + }, + { + "polygon": [ + [ + 4, + 1 + ], + [ + 4, + 3 + ], + [ + 2, + 1 + ] + ] + }, + { + "polygon": [ + [ + 1, + 1 + ], + [ + 3, + 1 + ], + [ + 1, + 3 + ] + ] + } + ], + "meta": { + "seed": 4202034, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.262626, + "contourComplexity": 190, + "connectedComponents": 1, + "fillRatio": 0.126736, + "difficultyScore": 0.637033, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 84, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-083/target.png", + "shapes": { + "S1": "../images/voi-083/shape_S1.png", + "S2": "../images/voi-083/shape_S2.png", + "S3": "../images/voi-083/shape_S3.png", + "S4": "../images/voi-083/shape_S4.png" + } + }, + "ID": "voi-083", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V2", + "grid": [ + 5, + 3 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V2", + "grid": [ + 4, + 3 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V2", + "grid": [ + 3, + 1 + ] + } + ] + }, + "legacy_answer": "S1 270 V2 [5,3]\nS3 270 V2 [4,3]\nS4 0 V2 [3,1]", + "solutionText": "S1 270 V2 [5,3]\nS3 270 V2 [4,3]\nS4 0 V2 [3,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-083\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-084.json b/voi/data/voi-084.json new file mode 100644 index 0000000000000000000000000000000000000000..07e860b10ff7a13cd4ec784c260e7fe4a48a8a9e --- /dev/null +++ b/voi/data/voi-084.json @@ -0,0 +1,178 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 1, + 5 + ], + [ + 1, + 3 + ], + [ + 3, + 5 + ] + ] + }, + { + "polygon": [ + [ + 4, + 5 + ], + [ + 2, + 5 + ], + [ + 4, + 3 + ] + ] + }, + { + "polygon": [ + [ + 4, + 2 + ], + [ + 4, + 4 + ], + [ + 2, + 2 + ] + ] + } + ], + "meta": { + "seed": 4202035, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "contourComplexity": 190, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.351477, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 85, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-084/target.png", + "shapes": { + "S1": "../images/voi-084/shape_S1.png", + "S2": "../images/voi-084/shape_S2.png", + "S3": "../images/voi-084/shape_S3.png", + "S4": "../images/voi-084/shape_S4.png" + } + }, + "ID": "voi-084", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V1", + "grid": [ + 1, + 5 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V2", + "grid": [ + 2, + 5 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V2", + "grid": [ + 4, + 4 + ] + } + ] + }, + "legacy_answer": "S1 90 V1 [1,5]\nS2 180 V2 [2,5]\nS3 270 V2 [4,4]", + "solutionText": "S1 90 V1 [1,5]\nS2 180 V2 [2,5]\nS3 270 V2 [4,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-084\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-085.json b/voi/data/voi-085.json new file mode 100644 index 0000000000000000000000000000000000000000..9785efbe0fff59375a9af79b9fc1de9ff229f820 --- /dev/null +++ b/voi/data/voi-085.json @@ -0,0 +1,194 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 0, + 3 + ], + [ + 0, + 1 + ], + [ + 1, + 1 + ], + [ + 1, + 3 + ] + ] + }, + { + "polygon": [ + [ + 1, + 4 + ], + [ + 1, + 2 + ], + [ + 3, + 2 + ], + [ + 3, + 4 + ] + ] + }, + { + "polygon": [ + [ + 3, + 2 + ], + [ + 3, + 3 + ], + [ + 2, + 2 + ] + ] + } + ], + "meta": { + "seed": 4202036, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.162679, + "contourComplexity": 40, + "connectedComponents": 1, + "fillRatio": 0.15191, + "difficultyScore": 0.405463, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 86, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-085/target.png", + "shapes": { + "S1": "../images/voi-085/shape_S1.png", + "S2": "../images/voi-085/shape_S2.png", + "S3": "../images/voi-085/shape_S3.png", + "S4": "../images/voi-085/shape_S4.png" + } + }, + "ID": "voi-085", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V3", + "grid": [ + 1, + 1 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V2", + "grid": [ + 1, + 2 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V2", + "grid": [ + 3, + 3 + ] + } + ] + }, + "legacy_answer": "S1 90 V3 [1,1]\nS2 90 V2 [1,2]\nS3 270 V2 [3,3]", + "solutionText": "S1 90 V3 [1,1]\nS2 90 V2 [1,2]\nS3 270 V2 [3,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-085\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[0,1]\n- S4: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-086.json b/voi/data/voi-086.json new file mode 100644 index 0000000000000000000000000000000000000000..eb03f2bbb9a450e1326395cf6a559d3b98a2ebf3 --- /dev/null +++ b/voi/data/voi-086.json @@ -0,0 +1,186 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 3 + ], + [ + 2, + 2 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 0, + 4 + ], + [ + 0, + 3 + ], + [ + 1, + 4 + ] + ] + }, + { + "polygon": [ + [ + 0, + 2 + ], + [ + 2, + 2 + ], + [ + 2, + 4 + ], + [ + 0, + 4 + ] + ] + } + ], + "meta": { + "seed": 4202037, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.209877, + "contourComplexity": 68, + "connectedComponents": 1, + "fillRatio": 0.111111, + "difficultyScore": 0.457284, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 87, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-086/target.png", + "shapes": { + "S1": "../images/voi-086/shape_S1.png", + "S2": "../images/voi-086/shape_S2.png", + "S3": "../images/voi-086/shape_S3.png", + "S4": "../images/voi-086/shape_S4.png" + } + }, + "ID": "voi-086", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V1", + "grid": [ + 2, + 3 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V1", + "grid": [ + 0, + 4 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V3", + "grid": [ + 2, + 4 + ] + } + ] + }, + "legacy_answer": "S1 90 V1 [2,3]\nS2 90 V1 [0,4]\nS3 0 V3 [2,4]", + "solutionText": "S1 90 V1 [2,3]\nS2 90 V1 [0,4]\nS3 0 V3 [2,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-086\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[0,1]\n- S2: V1=[0,0], V2=[1,0], V3=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-087.json b/voi/data/voi-087.json new file mode 100644 index 0000000000000000000000000000000000000000..7a6be13168323d3700761d349b133bce1522d58e --- /dev/null +++ b/voi/data/voi-087.json @@ -0,0 +1,182 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 1 + ], + [ + 4, + 1 + ], + [ + 4, + 3 + ], + [ + 2, + 3 + ] + ] + }, + { + "polygon": [ + [ + 4, + 2 + ], + [ + 3, + 2 + ], + [ + 4, + 1 + ] + ] + }, + { + "polygon": [ + [ + 3, + 5 + ], + [ + 1, + 5 + ], + [ + 3, + 3 + ] + ] + } + ], + "meta": { + "seed": 4202038, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.161137, + "contourComplexity": 102, + "connectedComponents": 1, + "fillRatio": 0.153646, + "difficultyScore": 0.408159, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 88, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-087/target.png", + "shapes": { + "S1": "../images/voi-087/shape_S1.png", + "S2": "../images/voi-087/shape_S2.png", + "S3": "../images/voi-087/shape_S3.png", + "S4": "../images/voi-087/shape_S4.png" + } + }, + "ID": "voi-087", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 0, + "vertex": "V2", + "grid": [ + 4, + 1 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V1", + "grid": [ + 4, + 2 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V3", + "grid": [ + 3, + 3 + ] + } + ] + }, + "legacy_answer": "S2 0 V2 [4,1]\nS3 180 V1 [4,2]\nS4 180 V3 [3,3]", + "solutionText": "S2 0 V2 [4,1]\nS3 180 V1 [4,2]\nS4 180 V3 [3,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-087\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-088.json b/voi/data/voi-088.json new file mode 100644 index 0000000000000000000000000000000000000000..ac191433d8a90eecf338d87090a47a94270800af --- /dev/null +++ b/voi/data/voi-088.json @@ -0,0 +1,190 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 3 + ], + [ + 4, + 1 + ], + [ + 6, + 1 + ], + [ + 6, + 3 + ] + ] + }, + { + "polygon": [ + [ + 3, + 4 + ], + [ + 3, + 2 + ], + [ + 5, + 2 + ], + [ + 5, + 4 + ] + ] + }, + { + "polygon": [ + [ + 4, + 2 + ], + [ + 2, + 2 + ], + [ + 4, + 0 + ] + ] + } + ], + "meta": { + "seed": 4202039, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.198758, + "contourComplexity": 76, + "connectedComponents": 1, + "fillRatio": 0.223958, + "difficultyScore": 0.187114, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 89, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-088/target.png", + "shapes": { + "S1": "../images/voi-088/shape_S1.png", + "S2": "../images/voi-088/shape_S2.png", + "S3": "../images/voi-088/shape_S3.png", + "S4": "../images/voi-088/shape_S4.png" + } + }, + "ID": "voi-088", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 90, + "vertex": "V4", + "grid": [ + 6, + 3 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V4", + "grid": [ + 5, + 4 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V1", + "grid": [ + 4, + 2 + ] + } + ] + }, + "legacy_answer": "S2 90 V4 [6,3]\nS3 90 V4 [5,4]\nS4 180 V1 [4,2]", + "solutionText": "S2 90 V4 [6,3]\nS3 90 V4 [5,4]\nS4 180 V1 [4,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-088\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-089.json b/voi/data/voi-089.json new file mode 100644 index 0000000000000000000000000000000000000000..db3727ba7079443e1a38ca5f94e73d76d3505849 --- /dev/null +++ b/voi/data/voi-089.json @@ -0,0 +1,202 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 2 + ], + [ + 2, + 4 + ], + [ + 0, + 4 + ], + [ + 0, + 2 + ] + ] + }, + { + "polygon": [ + [ + 2, + 2 + ], + [ + 3, + 2 + ], + [ + 3, + 3 + ], + [ + 2, + 3 + ] + ] + }, + { + "polygon": [ + [ + 1, + 5 + ], + [ + 1, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 5 + ] + ] + } + ], + "meta": { + "seed": 4202040, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "contourComplexity": 11, + "connectedComponents": 1, + "fillRatio": 0.194444, + "difficultyScore": 0.34, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 90, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-089/target.png", + "shapes": { + "S1": "../images/voi-089/shape_S1.png", + "S2": "../images/voi-089/shape_S2.png", + "S3": "../images/voi-089/shape_S3.png", + "S4": "../images/voi-089/shape_S4.png" + } + }, + "ID": "voi-089", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V2", + "grid": [ + 2, + 4 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V1", + "grid": [ + 2, + 2 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V4", + "grid": [ + 3, + 5 + ] + } + ] + }, + "legacy_answer": "S1 270 V2 [2,4]\nS2 0 V1 [2,2]\nS4 90 V4 [3,5]", + "solutionText": "S1 270 V2 [2,4]\nS2 0 V1 [2,2]\nS4 90 V4 [3,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-089\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-090.json b/voi/data/voi-090.json new file mode 100644 index 0000000000000000000000000000000000000000..e6ae39d9ac5d6e36f7e2a6972868ef23bc5a3c3c --- /dev/null +++ b/voi/data/voi-090.json @@ -0,0 +1,194 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 4 + ], + [ + 4, + 4 + ], + [ + 4, + 6 + ], + [ + 3, + 6 + ] + ] + }, + { + "polygon": [ + [ + 3, + 4 + ], + [ + 1, + 4 + ], + [ + 1, + 3 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 2, + 6 + ], + [ + 2, + 4 + ], + [ + 4, + 6 + ] + ] + } + ], + "meta": { + "seed": 4202041, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 72, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.381191, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 91, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-090/target.png", + "shapes": { + "S1": "../images/voi-090/shape_S1.png", + "S2": "../images/voi-090/shape_S2.png", + "S3": "../images/voi-090/shape_S3.png", + "S4": "../images/voi-090/shape_S4.png" + } + }, + "ID": "voi-090", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V1", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V1", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V3", + "grid": [ + 4, + 6 + ] + } + ] + }, + "legacy_answer": "S1 0 V1 [3,4]\nS2 180 V1 [3,4]\nS3 90 V3 [4,6]", + "solutionText": "S1 0 V1 [3,4]\nS2 180 V1 [3,4]\nS3 90 V3 [4,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-090\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-091.json b/voi/data/voi-091.json new file mode 100644 index 0000000000000000000000000000000000000000..4518580ba944cc248014e2eb367228248099f82c --- /dev/null +++ b/voi/data/voi-091.json @@ -0,0 +1,194 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 0, + 1 + ], + [ + 2, + 1 + ], + [ + 2, + 3 + ], + [ + 0, + 3 + ] + ] + }, + { + "polygon": [ + [ + 4, + 2 + ], + [ + 4, + 3 + ], + [ + 2, + 3 + ], + [ + 2, + 2 + ] + ] + }, + { + "polygon": [ + [ + 2, + 0 + ], + [ + 2, + 2 + ], + [ + 0, + 0 + ] + ] + } + ], + "meta": { + "seed": 4202042, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.131783, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.194444, + "difficultyScore": 0.443979, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 92, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-091/target.png", + "shapes": { + "S1": "../images/voi-091/shape_S1.png", + "S2": "../images/voi-091/shape_S2.png", + "S3": "../images/voi-091/shape_S3.png", + "S4": "../images/voi-091/shape_S4.png" + } + }, + "ID": "voi-091", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V2", + "grid": [ + 2, + 1 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V4", + "grid": [ + 2, + 2 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V1", + "grid": [ + 2, + 0 + ] + } + ] + }, + "legacy_answer": "S1 0 V2 [2,1]\nS2 270 V4 [2,2]\nS4 270 V1 [2,0]", + "solutionText": "S1 0 V2 [2,1]\nS2 270 V4 [2,2]\nS4 270 V1 [2,0]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-091\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-092.json b/voi/data/voi-092.json new file mode 100644 index 0000000000000000000000000000000000000000..7fd1e7815c5047bda3fcd9891c195203d7c8e5f0 --- /dev/null +++ b/voi/data/voi-092.json @@ -0,0 +1,186 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 4 + ], + [ + 2, + 4 + ], + [ + 4, + 2 + ] + ] + }, + { + "polygon": [ + [ + 4, + 2 + ], + [ + 3, + 2 + ], + [ + 4, + 1 + ] + ] + }, + { + "polygon": [ + [ + 3, + 2 + ], + [ + 3, + 4 + ], + [ + 1, + 4 + ], + [ + 1, + 2 + ] + ] + } + ], + "meta": { + "seed": 4202043, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.161137, + "contourComplexity": 103, + "connectedComponents": 1, + "fillRatio": 0.153646, + "difficultyScore": 0.408159, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 93, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-092/target.png", + "shapes": { + "S1": "../images/voi-092/shape_S1.png", + "S2": "../images/voi-092/shape_S2.png", + "S3": "../images/voi-092/shape_S3.png", + "S4": "../images/voi-092/shape_S4.png" + } + }, + "ID": "voi-092", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V3", + "grid": [ + 4, + 2 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V1", + "grid": [ + 4, + 2 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V4", + "grid": [ + 1, + 2 + ] + } + ] + }, + "legacy_answer": "S1 180 V3 [4,2]\nS3 180 V1 [4,2]\nS4 270 V4 [1,2]", + "solutionText": "S1 180 V3 [4,2]\nS3 180 V1 [4,2]\nS4 270 V4 [1,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-092\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S3: V1=[0,0], V2=[1,0], V3=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-093.json b/voi/data/voi-093.json new file mode 100644 index 0000000000000000000000000000000000000000..ea331c6a341731b1252faf9567106df09e67e841 --- /dev/null +++ b/voi/data/voi-093.json @@ -0,0 +1,182 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 2 + ], + [ + 4, + 2 + ], + [ + 4, + 1 + ], + [ + 6, + 1 + ] + ] + }, + { + "polygon": [ + [ + 6, + 3 + ], + [ + 4, + 3 + ], + [ + 6, + 1 + ] + ] + }, + { + "polygon": [ + [ + 4, + 2 + ], + [ + 4, + 4 + ], + [ + 2, + 2 + ] + ] + } + ], + "meta": { + "seed": 4202044, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.173469, + "contourComplexity": 135, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.384872, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 94, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-093/target.png", + "shapes": { + "S1": "../images/voi-093/shape_S1.png", + "S2": "../images/voi-093/shape_S2.png", + "S3": "../images/voi-093/shape_S3.png", + "S4": "../images/voi-093/shape_S4.png" + } + }, + "ID": "voi-093", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 180, + "vertex": "V1", + "grid": [ + 6, + 2 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V2", + "grid": [ + 4, + 3 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V3", + "grid": [ + 2, + 2 + ] + } + ] + }, + "legacy_answer": "S2 180 V1 [6,2]\nS3 180 V2 [4,3]\nS4 270 V3 [2,2]", + "solutionText": "S2 180 V1 [6,2]\nS3 180 V2 [4,3]\nS4 270 V3 [2,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-093\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-094.json b/voi/data/voi-094.json new file mode 100644 index 0000000000000000000000000000000000000000..a067593ccbe3b6320c991399a0e9d7778a62faac --- /dev/null +++ b/voi/data/voi-094.json @@ -0,0 +1,190 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 0 + ], + [ + 4, + 0 + ], + [ + 4, + 2 + ], + [ + 2, + 2 + ] + ] + }, + { + "polygon": [ + [ + 1, + 3 + ], + [ + 1, + 2 + ], + [ + 3, + 2 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 1, + 3 + ], + [ + 1, + 2 + ], + [ + 2, + 3 + ] + ] + } + ], + "meta": { + "seed": 4202045, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.162679, + "contourComplexity": 38, + "connectedComponents": 1, + "fillRatio": 0.15191, + "difficultyScore": 0.405463, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 95, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-094/target.png", + "shapes": { + "S1": "../images/voi-094/shape_S1.png", + "S2": "../images/voi-094/shape_S2.png", + "S3": "../images/voi-094/shape_S3.png", + "S4": "../images/voi-094/shape_S4.png" + } + }, + "ID": "voi-094", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V2", + "grid": [ + 4, + 0 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V2", + "grid": [ + 1, + 2 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V2", + "grid": [ + 1, + 2 + ] + } + ] + }, + "legacy_answer": "S1 0 V2 [4,0]\nS3 90 V2 [1,2]\nS4 90 V2 [1,2]", + "solutionText": "S1 0 V2 [4,0]\nS3 90 V2 [1,2]\nS4 90 V2 [1,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-094\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-095.json b/voi/data/voi-095.json new file mode 100644 index 0000000000000000000000000000000000000000..34aacd0246374962beedd24b15014ee8c105269b --- /dev/null +++ b/voi/data/voi-095.json @@ -0,0 +1,198 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 3 + ], + [ + 4, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 3, + 0 + ], + [ + 5, + 0 + ], + [ + 5, + 2 + ], + [ + 3, + 2 + ] + ] + }, + { + "polygon": [ + [ + 2, + 4 + ], + [ + 2, + 2 + ], + [ + 4, + 2 + ], + [ + 4, + 4 + ] + ] + } + ], + "meta": { + "seed": 4202046, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.194444, + "difficultyScore": 0.34, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 96, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-095/target.png", + "shapes": { + "S1": "../images/voi-095/shape_S1.png", + "S2": "../images/voi-095/shape_S2.png", + "S3": "../images/voi-095/shape_S3.png", + "S4": "../images/voi-095/shape_S4.png" + } + }, + "ID": "voi-095", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V4", + "grid": [ + 3, + 3 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V2", + "grid": [ + 5, + 0 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V1", + "grid": [ + 2, + 4 + ] + } + ] + }, + "legacy_answer": "S1 270 V4 [3,3]\nS2 0 V2 [5,0]\nS4 90 V1 [2,4]", + "solutionText": "S1 270 V4 [3,3]\nS2 0 V2 [5,0]\nS4 90 V1 [2,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-095\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-096.json b/voi/data/voi-096.json new file mode 100644 index 0000000000000000000000000000000000000000..fcd9c246690d6d640f8bc6e8a21803a47aa11985 --- /dev/null +++ b/voi/data/voi-096.json @@ -0,0 +1,186 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 4 + ], + [ + 2, + 4 + ], + [ + 4, + 2 + ] + ] + }, + { + "polygon": [ + [ + 3, + 2 + ], + [ + 3, + 4 + ], + [ + 2, + 4 + ], + [ + 2, + 2 + ] + ] + }, + { + "polygon": [ + [ + 2, + 3 + ], + [ + 2, + 5 + ], + [ + 0, + 3 + ] + ] + } + ], + "meta": { + "seed": 4202047, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.173469, + "contourComplexity": 134, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.384872, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 97, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-096/target.png", + "shapes": { + "S1": "../images/voi-096/shape_S1.png", + "S2": "../images/voi-096/shape_S2.png", + "S3": "../images/voi-096/shape_S3.png", + "S4": "../images/voi-096/shape_S4.png" + } + }, + "ID": "voi-096", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 180, + "vertex": "V2", + "grid": [ + 2, + 4 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V2", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V1", + "grid": [ + 2, + 3 + ] + } + ] + }, + "legacy_answer": "S2 180 V2 [2,4]\nS3 270 V2 [3,4]\nS4 270 V1 [2,3]", + "solutionText": "S2 180 V2 [2,4]\nS3 270 V2 [3,4]\nS4 270 V1 [2,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-096\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-097.json b/voi/data/voi-097.json new file mode 100644 index 0000000000000000000000000000000000000000..049e0277c26716d302cb0f5aec5358ea009c7dd9 --- /dev/null +++ b/voi/data/voi-097.json @@ -0,0 +1,194 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 0 + ], + [ + 6, + 0 + ], + [ + 6, + 1 + ], + [ + 4, + 1 + ] + ] + }, + { + "polygon": [ + [ + 4, + 4 + ], + [ + 4, + 2 + ], + [ + 5, + 2 + ], + [ + 5, + 4 + ] + ] + }, + { + "polygon": [ + [ + 6, + 2 + ], + [ + 4, + 2 + ], + [ + 6, + 0 + ] + ] + } + ], + "meta": { + "seed": 4202048, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.381191, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 98, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-097/target.png", + "shapes": { + "S1": "../images/voi-097/shape_S1.png", + "S2": "../images/voi-097/shape_S2.png", + "S3": "../images/voi-097/shape_S3.png", + "S4": "../images/voi-097/shape_S4.png" + } + }, + "ID": "voi-097", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 0, + "vertex": "V2", + "grid": [ + 6, + 0 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V1", + "grid": [ + 4, + 4 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V2", + "grid": [ + 4, + 2 + ] + } + ] + }, + "legacy_answer": "S2 0 V2 [6,0]\nS3 90 V1 [4,4]\nS4 180 V2 [4,2]", + "solutionText": "S2 0 V2 [6,0]\nS3 90 V1 [4,4]\nS4 180 V2 [4,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-097\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-098.json b/voi/data/voi-098.json new file mode 100644 index 0000000000000000000000000000000000000000..d88582fbee14ddde3ac7c878763e399ef97be6d2 --- /dev/null +++ b/voi/data/voi-098.json @@ -0,0 +1,194 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 0, + 1 + ], + [ + 2, + 1 + ], + [ + 2, + 3 + ], + [ + 0, + 3 + ] + ] + }, + { + "polygon": [ + [ + 1, + 5 + ], + [ + 1, + 3 + ], + [ + 3, + 5 + ] + ] + }, + { + "polygon": [ + [ + 2, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 5 + ], + [ + 2, + 5 + ] + ] + } + ], + "meta": { + "seed": 4202049, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.10559, + "contourComplexity": 74, + "connectedComponents": 1, + "fillRatio": 0.25, + "difficultyScore": 0.43764, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 99, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-098/target.png", + "shapes": { + "S1": "../images/voi-098/shape_S1.png", + "S2": "../images/voi-098/shape_S2.png", + "S3": "../images/voi-098/shape_S3.png", + "S4": "../images/voi-098/shape_S4.png" + } + }, + "ID": "voi-098", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V3", + "grid": [ + 2, + 3 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V3", + "grid": [ + 3, + 5 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V1", + "grid": [ + 2, + 3 + ] + } + ] + }, + "legacy_answer": "S1 0 V3 [2,3]\nS2 90 V3 [3,5]\nS3 0 V1 [2,3]", + "solutionText": "S1 0 V3 [2,3]\nS2 90 V3 [3,5]\nS3 0 V1 [2,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-098\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-099.json b/voi/data/voi-099.json new file mode 100644 index 0000000000000000000000000000000000000000..8cadf1fa569ea1ec39cc568c45ba3f70e708e4ec --- /dev/null +++ b/voi/data/voi-099.json @@ -0,0 +1,182 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 3 + ], + [ + 3, + 4 + ], + [ + 2, + 3 + ] + ] + }, + { + "polygon": [ + [ + 5, + 6 + ], + [ + 3, + 6 + ], + [ + 3, + 4 + ], + [ + 5, + 4 + ] + ] + }, + { + "polygon": [ + [ + 2, + 4 + ], + [ + 4, + 4 + ], + [ + 2, + 6 + ] + ] + } + ], + "meta": { + "seed": 4202050, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.161137, + "contourComplexity": 102, + "connectedComponents": 1, + "fillRatio": 0.153646, + "difficultyScore": 0.408159, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 100, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-099/target.png", + "shapes": { + "S1": "../images/voi-099/shape_S1.png", + "S2": "../images/voi-099/shape_S2.png", + "S3": "../images/voi-099/shape_S3.png", + "S4": "../images/voi-099/shape_S4.png" + } + }, + "ID": "voi-099", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V3", + "grid": [ + 2, + 3 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V4", + "grid": [ + 5, + 4 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V2", + "grid": [ + 4, + 4 + ] + } + ] + }, + "legacy_answer": "S1 270 V3 [2,3]\nS3 180 V4 [5,4]\nS4 0 V2 [4,4]", + "solutionText": "S1 270 V3 [2,3]\nS3 180 V4 [5,4]\nS4 0 V2 [4,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-099\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[0,1]\n- S2: V1=[0,0], V2=[1,0], V3=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-100.json b/voi/data/voi-100.json new file mode 100644 index 0000000000000000000000000000000000000000..93346dcb3645daa49980d4e99086bd5ad58ca3d6 --- /dev/null +++ b/voi/data/voi-100.json @@ -0,0 +1,202 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 2 + ], + [ + 2, + 2 + ], + [ + 2, + 0 + ], + [ + 5, + 0 + ] + ] + }, + { + "polygon": [ + [ + 3, + 1 + ], + [ + 3, + 0 + ], + [ + 4, + 0 + ], + [ + 4, + 1 + ] + ] + }, + { + "polygon": [ + [ + 5, + 1 + ], + [ + 6, + 1 + ], + [ + 6, + 3 + ], + [ + 5, + 3 + ] + ] + } + ], + "meta": { + "seed": 4203001, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "contourComplexity": 12, + "connectedComponents": 1, + "fillRatio": 0.109375, + "difficultyScore": 0.392361, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 101, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-100/target.png", + "shapes": { + "S1": "../images/voi-100/shape_S1.png", + "S2": "../images/voi-100/shape_S2.png", + "S3": "../images/voi-100/shape_S3.png", + "S4": "../images/voi-100/shape_S4.png" + } + }, + "ID": "voi-100", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V3", + "grid": [ + 2, + 0 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V3", + "grid": [ + 4, + 0 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V4", + "grid": [ + 5, + 3 + ] + } + ] + }, + "legacy_answer": "S1 180 V3 [2,0]\nS3 90 V3 [4,0]\nS4 0 V4 [5,3]", + "solutionText": "S1 180 V3 [2,0]\nS3 90 V3 [4,0]\nS4 0 V4 [5,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-100\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S4: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-101.json b/voi/data/voi-101.json new file mode 100644 index 0000000000000000000000000000000000000000..b540e9067b0b9205e9784e981fabc51434647f5d --- /dev/null +++ b/voi/data/voi-101.json @@ -0,0 +1,202 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 3 + ], + [ + 8, + 3 + ], + [ + 8, + 5 + ], + [ + 5, + 5 + ] + ] + }, + { + "polygon": [ + [ + 6, + 7 + ], + [ + 5, + 7 + ], + [ + 5, + 4 + ], + [ + 6, + 4 + ] + ] + }, + { + "polygon": [ + [ + 5, + 3 + ], + [ + 5, + 6 + ], + [ + 3, + 6 + ], + [ + 3, + 3 + ] + ] + } + ], + "meta": { + "seed": 4203002, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.133333, + "contourComplexity": 12, + "connectedComponents": 1, + "fillRatio": 0.203125, + "difficultyScore": 0.560417, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 102, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-101/target.png", + "shapes": { + "S1": "../images/voi-101/shape_S1.png", + "S2": "../images/voi-101/shape_S2.png", + "S3": "../images/voi-101/shape_S3.png", + "S4": "../images/voi-101/shape_S4.png" + } + }, + "ID": "voi-101", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V3", + "grid": [ + 8, + 5 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V3", + "grid": [ + 5, + 4 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V1", + "grid": [ + 5, + 3 + ] + } + ] + }, + "legacy_answer": "S1 0 V3 [8,5]\nS3 180 V3 [5,4]\nS4 270 V1 [5,3]", + "solutionText": "S1 0 V3 [8,5]\nS3 180 V3 [5,4]\nS4 270 V1 [5,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-101\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-102.json b/voi/data/voi-102.json new file mode 100644 index 0000000000000000000000000000000000000000..732423cc8893ad73ff13b5ae160d755b40fb7596 --- /dev/null +++ b/voi/data/voi-102.json @@ -0,0 +1,218 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 0, + 8 + ], + [ + 0, + 6 + ], + [ + 1, + 6 + ], + [ + 1, + 8 + ] + ] + }, + { + "polygon": [ + [ + 2, + 8 + ], + [ + 0, + 8 + ], + [ + 0, + 7 + ], + [ + 1, + 7 + ], + [ + 1, + 5 + ], + [ + 2, + 5 + ] + ] + }, + { + "polygon": [ + [ + 5, + 7 + ], + [ + 2, + 7 + ], + [ + 2, + 5 + ], + [ + 5, + 5 + ] + ] + } + ], + "meta": { + "seed": 4203003, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.166667, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.520833, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 103, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-102/target.png", + "shapes": { + "S1": "../images/voi-102/shape_S1.png", + "S2": "../images/voi-102/shape_S2.png", + "S3": "../images/voi-102/shape_S3.png", + "S4": "../images/voi-102/shape_S4.png" + } + }, + "ID": "voi-102", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V1", + "grid": [ + 0, + 8 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V2", + "grid": [ + 0, + 8 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V1", + "grid": [ + 5, + 7 + ] + } + ] + }, + "legacy_answer": "S1 90 V1 [0,8]\nS2 180 V2 [0,8]\nS4 180 V1 [5,7]", + "solutionText": "S1 90 V1 [0,8]\nS2 180 V2 [0,8]\nS4 180 V1 [5,7]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-102\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-103.json b/voi/data/voi-103.json new file mode 100644 index 0000000000000000000000000000000000000000..459ad548a55529b28414b41f6e3c9ae8b3c0a48f --- /dev/null +++ b/voi/data/voi-103.json @@ -0,0 +1,214 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 3 + ], + [ + 5, + 6 + ], + [ + 3, + 6 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 3, + 4 + ], + [ + 3, + 3 + ], + [ + 6, + 3 + ], + [ + 6, + 4 + ] + ] + }, + { + "polygon": [ + [ + 2, + 4 + ], + [ + 2, + 2 + ], + [ + 3, + 2 + ], + [ + 3, + 3 + ], + [ + 5, + 3 + ], + [ + 5, + 4 + ] + ] + } + ], + "meta": { + "seed": 4203004, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.307692, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.649519, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 104, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-103/target.png", + "shapes": { + "S1": "../images/voi-103/shape_S1.png", + "S2": "../images/voi-103/shape_S2.png", + "S3": "../images/voi-103/shape_S3.png", + "S4": "../images/voi-103/shape_S4.png" + } + }, + "ID": "voi-103", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V2", + "grid": [ + 5, + 6 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V4", + "grid": [ + 6, + 4 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V6", + "grid": [ + 5, + 4 + ] + } + ] + }, + "legacy_answer": "S1 270 V2 [5,6]\nS2 90 V4 [6,4]\nS4 90 V6 [5,4]", + "solutionText": "S1 270 V2 [5,6]\nS2 90 V4 [6,4]\nS4 90 V6 [5,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-103\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S3: V1=[0,0], V2=[1,0], V3=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-104.json b/voi/data/voi-104.json new file mode 100644 index 0000000000000000000000000000000000000000..c60ea8fcb40ed126e4dadd6c437e22dac4a7649f --- /dev/null +++ b/voi/data/voi-104.json @@ -0,0 +1,202 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 4 + ], + [ + 1, + 4 + ], + [ + 1, + 1 + ], + [ + 2, + 1 + ] + ] + }, + { + "polygon": [ + [ + 2, + 5 + ], + [ + 2, + 2 + ], + [ + 4, + 2 + ], + [ + 4, + 5 + ] + ] + }, + { + "polygon": [ + [ + 3, + 2 + ], + [ + 3, + 3 + ], + [ + 2, + 3 + ], + [ + 2, + 2 + ] + ] + } + ], + "meta": { + "seed": 4203005, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.125, + "difficultyScore": 0.45, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 105, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-104/target.png", + "shapes": { + "S1": "../images/voi-104/shape_S1.png", + "S2": "../images/voi-104/shape_S2.png", + "S3": "../images/voi-104/shape_S3.png", + "S4": "../images/voi-104/shape_S4.png" + } + }, + "ID": "voi-104", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V1", + "grid": [ + 2, + 4 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V4", + "grid": [ + 4, + 5 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V3", + "grid": [ + 2, + 3 + ] + } + ] + }, + "legacy_answer": "S1 180 V1 [2,4]\nS3 90 V4 [4,5]\nS4 270 V3 [2,3]", + "solutionText": "S1 180 V1 [2,4]\nS3 90 V4 [4,5]\nS4 270 V3 [2,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-104\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-105.json b/voi/data/voi-105.json new file mode 100644 index 0000000000000000000000000000000000000000..4f72c43f95e7df5883111b726d1df54cd3af70a5 --- /dev/null +++ b/voi/data/voi-105.json @@ -0,0 +1,218 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 2 + ], + [ + 4, + 2 + ] + ] + }, + { + "polygon": [ + [ + 4, + 7 + ], + [ + 3, + 7 + ], + [ + 3, + 4 + ], + [ + 4, + 4 + ] + ] + }, + { + "polygon": [ + [ + 3, + 6 + ], + [ + 1, + 6 + ], + [ + 1, + 5 + ], + [ + 2, + 5 + ], + [ + 2, + 3 + ], + [ + 3, + 3 + ] + ] + } + ], + "meta": { + "seed": 4203006, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "contourComplexity": 14, + "connectedComponents": 1, + "fillRatio": 0.125, + "difficultyScore": 0.45, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 106, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-105/target.png", + "shapes": { + "S1": "../images/voi-105/shape_S1.png", + "S2": "../images/voi-105/shape_S2.png", + "S3": "../images/voi-105/shape_S3.png", + "S4": "../images/voi-105/shape_S4.png" + } + }, + "ID": "voi-105", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V4", + "grid": [ + 4, + 2 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V4", + "grid": [ + 4, + 4 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V5", + "grid": [ + 2, + 3 + ] + } + ] + }, + "legacy_answer": "S1 180 V4 [4,2]\nS2 180 V4 [4,4]\nS3 180 V5 [2,3]", + "solutionText": "S1 180 V4 [4,2]\nS2 180 V4 [4,4]\nS3 180 V5 [2,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-105\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S2: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-106.json b/voi/data/voi-106.json new file mode 100644 index 0000000000000000000000000000000000000000..ac327f91360dc39b4536127a048a321437f8ad38 --- /dev/null +++ b/voi/data/voi-106.json @@ -0,0 +1,198 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 6 + ], + [ + 3, + 6 + ] + ] + }, + { + "polygon": [ + [ + 4, + 5 + ], + [ + 4, + 6 + ], + [ + 2, + 6 + ], + [ + 2, + 5 + ] + ] + }, + { + "polygon": [ + [ + 3, + 5 + ], + [ + 0, + 5 + ], + [ + 0, + 4 + ], + [ + 3, + 4 + ] + ] + } + ], + "meta": { + "seed": 4203007, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.109375, + "difficultyScore": 0.392361, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 107, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-106/target.png", + "shapes": { + "S1": "../images/voi-106/shape_S1.png", + "S2": "../images/voi-106/shape_S2.png", + "S3": "../images/voi-106/shape_S3.png", + "S4": "../images/voi-106/shape_S4.png" + } + }, + "ID": "voi-106", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V4", + "grid": [ + 3, + 6 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V2", + "grid": [ + 4, + 6 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V3", + "grid": [ + 0, + 4 + ] + } + ] + }, + "legacy_answer": "S1 0 V4 [3,6]\nS3 270 V2 [4,6]\nS4 180 V3 [0,4]", + "solutionText": "S1 0 V4 [3,6]\nS3 270 V2 [4,6]\nS4 180 V3 [0,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-106\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[0,1]\n- S3: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-107.json b/voi/data/voi-107.json new file mode 100644 index 0000000000000000000000000000000000000000..f92ed54df4b8bb22f097838fafc0d352bd0c5940 --- /dev/null +++ b/voi/data/voi-107.json @@ -0,0 +1,226 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 4 + ], + [ + 2, + 1 + ], + [ + 4, + 1 + ], + [ + 4, + 4 + ] + ] + }, + { + "polygon": [ + [ + 3, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 7 + ], + [ + 3, + 7 + ] + ] + }, + { + "polygon": [ + [ + 5, + 5 + ], + [ + 5, + 7 + ], + [ + 3, + 7 + ], + [ + 3, + 5 + ] + ] + } + ], + "meta": { + "seed": 4203008, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.530357, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 108, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-107/target.png", + "shapes": { + "S1": "../images/voi-107/shape_S1.png", + "S2": "../images/voi-107/shape_S2.png", + "S3": "../images/voi-107/shape_S3.png", + "S4": "../images/voi-107/shape_S4.png" + } + }, + "ID": "voi-107", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V2", + "grid": [ + 2, + 1 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V4", + "grid": [ + 4, + 5 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V1", + "grid": [ + 5, + 5 + ] + } + ] + }, + "legacy_answer": "S1 90 V2 [2,1]\nS2 0 V4 [4,5]\nS4 270 V1 [5,5]", + "solutionText": "S1 90 V2 [2,1]\nS2 0 V4 [4,5]\nS4 270 V1 [5,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-107\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-108.json b/voi/data/voi-108.json new file mode 100644 index 0000000000000000000000000000000000000000..7998b08ecbd7537c7daf99038dbf03c594a3729f --- /dev/null +++ b/voi/data/voi-108.json @@ -0,0 +1,218 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 6 + ], + [ + 7, + 6 + ], + [ + 7, + 8 + ], + [ + 4, + 8 + ] + ] + }, + { + "polygon": [ + [ + 4, + 7 + ], + [ + 4, + 8 + ], + [ + 3, + 8 + ], + [ + 3, + 7 + ] + ] + }, + { + "polygon": [ + [ + 8, + 8 + ], + [ + 6, + 8 + ], + [ + 6, + 7 + ], + [ + 7, + 7 + ], + [ + 7, + 5 + ], + [ + 8, + 5 + ] + ] + } + ], + "meta": { + "seed": 4203009, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "contourComplexity": 12, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.491477, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 109, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-108/target.png", + "shapes": { + "S1": "../images/voi-108/shape_S1.png", + "S2": "../images/voi-108/shape_S2.png", + "S3": "../images/voi-108/shape_S3.png", + "S4": "../images/voi-108/shape_S4.png" + } + }, + "ID": "voi-108", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V3", + "grid": [ + 7, + 8 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V3", + "grid": [ + 3, + 8 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V5", + "grid": [ + 7, + 5 + ] + } + ] + }, + "legacy_answer": "S1 0 V3 [7,8]\nS2 270 V3 [3,8]\nS3 180 V5 [7,5]", + "solutionText": "S1 0 V3 [7,8]\nS2 270 V3 [3,8]\nS3 180 V5 [7,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-108\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-109.json b/voi/data/voi-109.json new file mode 100644 index 0000000000000000000000000000000000000000..bc3715f2a95a06ede9a4b88c7b2709a79e55c0b4 --- /dev/null +++ b/voi/data/voi-109.json @@ -0,0 +1,202 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 8, + 6 + ], + [ + 8, + 7 + ], + [ + 5, + 7 + ], + [ + 5, + 6 + ] + ] + }, + { + "polygon": [ + [ + 6, + 7 + ], + [ + 3, + 7 + ], + [ + 4, + 6 + ], + [ + 6, + 6 + ] + ] + }, + { + "polygon": [ + [ + 4, + 4 + ], + [ + 7, + 4 + ], + [ + 7, + 6 + ], + [ + 4, + 6 + ] + ] + } + ], + "meta": { + "seed": 4203010, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.173442, + "contourComplexity": 42, + "connectedComponents": 1, + "fillRatio": 0.148926, + "difficultyScore": 0.508381, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 110, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-109/target.png", + "shapes": { + "S1": "../images/voi-109/shape_S1.png", + "S2": "../images/voi-109/shape_S2.png", + "S3": "../images/voi-109/shape_S3.png", + "S4": "../images/voi-109/shape_S4.png" + } + }, + "ID": "voi-109", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V3", + "grid": [ + 5, + 7 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V4", + "grid": [ + 6, + 6 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V4", + "grid": [ + 4, + 6 + ] + } + ] + }, + "legacy_answer": "S1 270 V3 [5,7]\nS2 180 V4 [6,6]\nS3 0 V4 [4,6]", + "solutionText": "S1 270 V3 [5,7]\nS2 180 V4 [6,6]\nS3 0 V4 [4,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-109\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S2: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-110.json b/voi/data/voi-110.json new file mode 100644 index 0000000000000000000000000000000000000000..cc9e642a39628d328d2a5f53ac55131662bf8cb8 --- /dev/null +++ b/voi/data/voi-110.json @@ -0,0 +1,210 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 1, + 6 + ], + [ + 4, + 6 + ], + [ + 4, + 8 + ], + [ + 1, + 8 + ] + ] + }, + { + "polygon": [ + [ + 1, + 6 + ], + [ + 1, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 6 + ] + ] + }, + { + "polygon": [ + [ + 2, + 5 + ], + [ + 2, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 5 + ] + ] + } + ], + "meta": { + "seed": 4203011, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "contourComplexity": 8, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.530357, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 111, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-110/target.png", + "shapes": { + "S1": "../images/voi-110/shape_S1.png", + "S2": "../images/voi-110/shape_S2.png", + "S3": "../images/voi-110/shape_S3.png", + "S4": "../images/voi-110/shape_S4.png" + } + }, + "ID": "voi-110", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 0, + "vertex": "V1", + "grid": [ + 1, + 6 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V1", + "grid": [ + 1, + 6 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V2", + "grid": [ + 2, + 3 + ] + } + ] + }, + "legacy_answer": "S2 0 V1 [1,6]\nS3 90 V1 [1,6]\nS4 90 V2 [2,3]", + "solutionText": "S2 0 V1 [1,6]\nS3 90 V1 [1,6]\nS4 90 V2 [2,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-110\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-111.json b/voi/data/voi-111.json new file mode 100644 index 0000000000000000000000000000000000000000..f67287564f064c67ec6df26acd2a065365d113e0 --- /dev/null +++ b/voi/data/voi-111.json @@ -0,0 +1,202 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 1, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 6 + ], + [ + 1, + 6 + ] + ] + }, + { + "polygon": [ + [ + 5, + 5 + ], + [ + 2, + 5 + ], + [ + 2, + 3 + ], + [ + 5, + 3 + ] + ] + }, + { + "polygon": [ + [ + 4, + 8 + ], + [ + 3, + 8 + ], + [ + 3, + 5 + ], + [ + 4, + 5 + ] + ] + } + ], + "meta": { + "seed": 4203012, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.153846, + "contourComplexity": 15, + "connectedComponents": 1, + "fillRatio": 0.171875, + "difficultyScore": 0.540865, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 112, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-111/target.png", + "shapes": { + "S1": "../images/voi-111/shape_S1.png", + "S2": "../images/voi-111/shape_S2.png", + "S3": "../images/voi-111/shape_S3.png", + "S4": "../images/voi-111/shape_S4.png" + } + }, + "ID": "voi-111", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V1", + "grid": [ + 1, + 4 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V3", + "grid": [ + 2, + 3 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V2", + "grid": [ + 3, + 8 + ] + } + ] + }, + "legacy_answer": "S1 0 V1 [1,4]\nS2 180 V3 [2,3]\nS3 180 V2 [3,8]", + "solutionText": "S1 0 V1 [1,4]\nS2 180 V3 [2,3]\nS3 180 V2 [3,8]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-111\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S4: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-112.json b/voi/data/voi-112.json new file mode 100644 index 0000000000000000000000000000000000000000..67a596f758f96347398d2f0d008ca74c5d146c77 --- /dev/null +++ b/voi/data/voi-112.json @@ -0,0 +1,202 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 2 + ], + [ + 5, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 2 + ] + ] + }, + { + "polygon": [ + [ + 3, + 6 + ], + [ + 3, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 6 + ] + ] + }, + { + "polygon": [ + [ + 2, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 5 + ], + [ + 2, + 5 + ] + ] + } + ], + "meta": { + "seed": 4203013, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.307692, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.649519, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 113, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-112/target.png", + "shapes": { + "S1": "../images/voi-112/shape_S1.png", + "S2": "../images/voi-112/shape_S2.png", + "S3": "../images/voi-112/shape_S3.png", + "S4": "../images/voi-112/shape_S4.png" + } + }, + "ID": "voi-112", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V2", + "grid": [ + 5, + 5 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V1", + "grid": [ + 3, + 6 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V3", + "grid": [ + 4, + 5 + ] + } + ] + }, + "legacy_answer": "S1 270 V2 [5,5]\nS2 90 V1 [3,6]\nS4 0 V3 [4,5]", + "solutionText": "S1 270 V2 [5,5]\nS2 90 V1 [3,6]\nS4 0 V3 [4,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-112\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S3: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-113.json b/voi/data/voi-113.json new file mode 100644 index 0000000000000000000000000000000000000000..f0b182402d6ba7c727e6a57a1a6055c73f20cec8 --- /dev/null +++ b/voi/data/voi-113.json @@ -0,0 +1,226 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 0 + ], + [ + 5, + 0 + ], + [ + 5, + 1 + ], + [ + 4, + 1 + ], + [ + 4, + 3 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 3, + 2 + ], + [ + 1, + 2 + ], + [ + 1, + 1 + ], + [ + 3, + 1 + ] + ] + }, + { + "polygon": [ + [ + 4, + 2 + ], + [ + 4, + 0 + ], + [ + 6, + 0 + ], + [ + 6, + 2 + ] + ] + } + ], + "meta": { + "seed": 4203014, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "contourComplexity": 14, + "connectedComponents": 1, + "fillRatio": 0.125, + "difficultyScore": 0.45, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 114, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-113/target.png", + "shapes": { + "S1": "../images/voi-113/shape_S1.png", + "S2": "../images/voi-113/shape_S2.png", + "S3": "../images/voi-113/shape_S3.png", + "S4": "../images/voi-113/shape_S4.png" + } + }, + "ID": "voi-113", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V6", + "grid": [ + 3, + 3 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V1", + "grid": [ + 3, + 2 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V4", + "grid": [ + 6, + 2 + ] + } + ] + }, + "legacy_answer": "S1 0 V6 [3,3]\nS2 180 V1 [3,2]\nS3 90 V4 [6,2]", + "solutionText": "S1 0 V6 [3,3]\nS2 180 V1 [3,2]\nS3 90 V4 [6,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-113\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-114.json b/voi/data/voi-114.json new file mode 100644 index 0000000000000000000000000000000000000000..52510ff385eef6ba85cf2e70d2f89cc099b34fcc --- /dev/null +++ b/voi/data/voi-114.json @@ -0,0 +1,202 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 8 + ], + [ + 2, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 8 + ] + ] + }, + { + "polygon": [ + [ + 2, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 6 + ], + [ + 2, + 6 + ] + ] + }, + { + "polygon": [ + [ + 3, + 6 + ], + [ + 1, + 6 + ], + [ + 1, + 5 + ], + [ + 3, + 5 + ] + ] + } + ], + "meta": { + "seed": 4203015, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.491477, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 115, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-114/target.png", + "shapes": { + "S1": "../images/voi-114/shape_S1.png", + "S2": "../images/voi-114/shape_S2.png", + "S3": "../images/voi-114/shape_S3.png", + "S4": "../images/voi-114/shape_S4.png" + } + }, + "ID": "voi-114", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 90, + "vertex": "V3", + "grid": [ + 3, + 5 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V4", + "grid": [ + 2, + 6 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V3", + "grid": [ + 1, + 5 + ] + } + ] + }, + "legacy_answer": "S2 90 V3 [3,5]\nS3 0 V4 [2,6]\nS4 180 V3 [1,5]", + "solutionText": "S2 90 V3 [3,5]\nS3 0 V4 [2,6]\nS4 180 V3 [1,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-114\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-115.json b/voi/data/voi-115.json new file mode 100644 index 0000000000000000000000000000000000000000..85c4923d532ac0b043d55c7e1f3bbe7980f6781b --- /dev/null +++ b/voi/data/voi-115.json @@ -0,0 +1,218 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 7 + ], + [ + 3, + 7 + ] + ] + }, + { + "polygon": [ + [ + 6, + 4 + ], + [ + 6, + 7 + ], + [ + 4, + 7 + ], + [ + 4, + 4 + ] + ] + }, + { + "polygon": [ + [ + 2, + 7 + ], + [ + 4, + 7 + ], + [ + 4, + 8 + ], + [ + 2, + 8 + ] + ] + } + ], + "meta": { + "seed": 4203016, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.166667, + "contourComplexity": 12, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.520833, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 116, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-115/target.png", + "shapes": { + "S1": "../images/voi-115/shape_S1.png", + "S2": "../images/voi-115/shape_S2.png", + "S3": "../images/voi-115/shape_S3.png", + "S4": "../images/voi-115/shape_S4.png" + } + }, + "ID": "voi-115", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V4", + "grid": [ + 4, + 5 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V4", + "grid": [ + 4, + 4 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V1", + "grid": [ + 2, + 7 + ] + } + ] + }, + "legacy_answer": "S1 0 V4 [4,5]\nS3 270 V4 [4,4]\nS4 0 V1 [2,7]", + "solutionText": "S1 0 V4 [4,5]\nS3 270 V4 [4,4]\nS4 0 V1 [2,7]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-115\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S2: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-116.json b/voi/data/voi-116.json new file mode 100644 index 0000000000000000000000000000000000000000..27fbbe984de5596074a92d24476bbdc402fa523c --- /dev/null +++ b/voi/data/voi-116.json @@ -0,0 +1,202 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 4 + ], + [ + 3, + 4 + ] + ] + }, + { + "polygon": [ + [ + 6, + 4 + ], + [ + 4, + 4 + ], + [ + 4, + 2 + ], + [ + 6, + 2 + ] + ] + }, + { + "polygon": [ + [ + 1, + 2 + ], + [ + 4, + 2 + ], + [ + 4, + 4 + ], + [ + 1, + 4 + ] + ] + } + ], + "meta": { + "seed": 4203017, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "contourComplexity": 8, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.491477, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 117, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-116/target.png", + "shapes": { + "S1": "../images/voi-116/shape_S1.png", + "S2": "../images/voi-116/shape_S2.png", + "S3": "../images/voi-116/shape_S3.png", + "S4": "../images/voi-116/shape_S4.png" + } + }, + "ID": "voi-116", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V2", + "grid": [ + 4, + 3 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V3", + "grid": [ + 4, + 2 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V2", + "grid": [ + 4, + 2 + ] + } + ] + }, + "legacy_answer": "S1 0 V2 [4,3]\nS2 180 V3 [4,2]\nS4 0 V2 [4,2]", + "solutionText": "S1 0 V2 [4,3]\nS2 180 V3 [4,2]\nS4 0 V2 [4,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-116\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-117.json b/voi/data/voi-117.json new file mode 100644 index 0000000000000000000000000000000000000000..06717176df6bf8faa65fed50bc2254a56493b52f --- /dev/null +++ b/voi/data/voi-117.json @@ -0,0 +1,218 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 2 + ], + [ + 3, + 2 + ], + [ + 3, + 1 + ], + [ + 4, + 1 + ] + ] + }, + { + "polygon": [ + [ + 2, + 3 + ], + [ + 2, + 1 + ], + [ + 4, + 1 + ], + [ + 4, + 3 + ] + ] + }, + { + "polygon": [ + [ + 2, + 4 + ], + [ + 0, + 4 + ], + [ + 0, + 3 + ], + [ + 1, + 3 + ], + [ + 1, + 1 + ], + [ + 2, + 1 + ] + ] + } + ], + "meta": { + "seed": 4203018, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.109375, + "difficultyScore": 0.392361, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 118, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-117/target.png", + "shapes": { + "S1": "../images/voi-117/shape_S1.png", + "S2": "../images/voi-117/shape_S2.png", + "S3": "../images/voi-117/shape_S3.png", + "S4": "../images/voi-117/shape_S4.png" + } + }, + "ID": "voi-117", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 180, + "vertex": "V2", + "grid": [ + 3, + 2 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V4", + "grid": [ + 4, + 3 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V1", + "grid": [ + 2, + 4 + ] + } + ] + }, + "legacy_answer": "S2 180 V2 [3,2]\nS3 90 V4 [4,3]\nS4 180 V1 [2,4]", + "solutionText": "S2 180 V2 [3,2]\nS3 90 V4 [4,3]\nS4 180 V1 [2,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-117\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-118.json b/voi/data/voi-118.json new file mode 100644 index 0000000000000000000000000000000000000000..fbe15a3a18421ec8ef4ca4c57b9e6b24f291560c --- /dev/null +++ b/voi/data/voi-118.json @@ -0,0 +1,202 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 2 + ], + [ + 4, + 5 + ], + [ + 2, + 5 + ], + [ + 2, + 2 + ] + ] + }, + { + "polygon": [ + [ + 3, + 3 + ], + [ + 3, + 2 + ], + [ + 4, + 2 + ], + [ + 4, + 3 + ] + ] + }, + { + "polygon": [ + [ + 0, + 2 + ], + [ + 2, + 2 + ], + [ + 2, + 3 + ], + [ + 0, + 3 + ] + ] + } + ], + "meta": { + "seed": 4203019, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "contourComplexity": 8, + "connectedComponents": 1, + "fillRatio": 0.109375, + "difficultyScore": 0.392361, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 119, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-118/target.png", + "shapes": { + "S1": "../images/voi-118/shape_S1.png", + "S2": "../images/voi-118/shape_S2.png", + "S3": "../images/voi-118/shape_S3.png", + "S4": "../images/voi-118/shape_S4.png" + } + }, + "ID": "voi-118", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V2", + "grid": [ + 4, + 5 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V4", + "grid": [ + 4, + 3 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V4", + "grid": [ + 0, + 3 + ] + } + ] + }, + "legacy_answer": "S1 270 V2 [4,5]\nS2 90 V4 [4,3]\nS3 0 V4 [0,3]", + "solutionText": "S1 270 V2 [4,5]\nS2 90 V4 [4,3]\nS3 0 V4 [0,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-118\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-119.json b/voi/data/voi-119.json new file mode 100644 index 0000000000000000000000000000000000000000..2835acb98fe0416fb7720b472ec1af07891b302e --- /dev/null +++ b/voi/data/voi-119.json @@ -0,0 +1,202 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 6 + ], + [ + 5, + 6 + ], + [ + 5, + 5 + ], + [ + 6, + 5 + ] + ] + }, + { + "polygon": [ + [ + 4, + 7 + ], + [ + 3, + 7 + ], + [ + 3, + 5 + ], + [ + 4, + 5 + ] + ] + }, + { + "polygon": [ + [ + 4, + 5 + ], + [ + 7, + 5 + ], + [ + 7, + 7 + ], + [ + 4, + 7 + ] + ] + } + ], + "meta": { + "seed": 4203020, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "contourComplexity": 8, + "connectedComponents": 1, + "fillRatio": 0.109375, + "difficultyScore": 0.392361, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 120, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-119/target.png", + "shapes": { + "S1": "../images/voi-119/shape_S1.png", + "S2": "../images/voi-119/shape_S2.png", + "S3": "../images/voi-119/shape_S3.png", + "S4": "../images/voi-119/shape_S4.png" + } + }, + "ID": "voi-119", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V2", + "grid": [ + 5, + 6 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V1", + "grid": [ + 4, + 7 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V4", + "grid": [ + 4, + 7 + ] + } + ] + }, + "legacy_answer": "S1 180 V2 [5,6]\nS2 180 V1 [4,7]\nS3 0 V4 [4,7]", + "solutionText": "S1 180 V2 [5,6]\nS2 180 V1 [4,7]\nS3 0 V4 [4,7]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-119\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S2: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-120.json b/voi/data/voi-120.json new file mode 100644 index 0000000000000000000000000000000000000000..8e27be1e603cd21e601b794e68bc4b20215ff551 --- /dev/null +++ b/voi/data/voi-120.json @@ -0,0 +1,202 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 0, + 5 + ], + [ + 0, + 2 + ], + [ + 2, + 2 + ], + [ + 2, + 5 + ] + ] + }, + { + "polygon": [ + [ + 0, + 4 + ], + [ + 0, + 3 + ], + [ + 1, + 3 + ], + [ + 1, + 4 + ] + ] + }, + { + "polygon": [ + [ + 1, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 7 + ], + [ + 1, + 7 + ] + ] + } + ], + "meta": { + "seed": 4203021, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "contourComplexity": 12, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.491477, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 121, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-120/target.png", + "shapes": { + "S1": "../images/voi-120/shape_S1.png", + "S2": "../images/voi-120/shape_S2.png", + "S3": "../images/voi-120/shape_S3.png", + "S4": "../images/voi-120/shape_S4.png" + } + }, + "ID": "voi-120", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V2", + "grid": [ + 0, + 2 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V3", + "grid": [ + 1, + 3 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V2", + "grid": [ + 3, + 5 + ] + } + ] + }, + "legacy_answer": "S1 90 V2 [0,2]\nS2 90 V3 [1,3]\nS4 0 V2 [3,5]", + "solutionText": "S1 90 V2 [0,2]\nS2 90 V3 [1,3]\nS4 0 V2 [3,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-120\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S3: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-121.json b/voi/data/voi-121.json new file mode 100644 index 0000000000000000000000000000000000000000..e4e982517e36e15b7ea8caf8a65a5d0d8fad4693 --- /dev/null +++ b/voi/data/voi-121.json @@ -0,0 +1,218 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 5 + ], + [ + 7, + 5 + ], + [ + 7, + 7 + ], + [ + 4, + 7 + ] + ] + }, + { + "polygon": [ + [ + 5, + 3 + ], + [ + 7, + 3 + ], + [ + 7, + 4 + ], + [ + 6, + 4 + ], + [ + 6, + 6 + ], + [ + 5, + 6 + ] + ] + }, + { + "polygon": [ + [ + 4, + 4 + ], + [ + 7, + 4 + ], + [ + 7, + 5 + ], + [ + 4, + 5 + ] + ] + } + ], + "meta": { + "seed": 4203022, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.307692, + "contourComplexity": 11, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.649519, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 122, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-121/target.png", + "shapes": { + "S1": "../images/voi-121/shape_S1.png", + "S2": "../images/voi-121/shape_S2.png", + "S3": "../images/voi-121/shape_S3.png", + "S4": "../images/voi-121/shape_S4.png" + } + }, + "ID": "voi-121", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V3", + "grid": [ + 7, + 7 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V2", + "grid": [ + 7, + 3 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V2", + "grid": [ + 7, + 4 + ] + } + ] + }, + "legacy_answer": "S1 0 V3 [7,7]\nS2 0 V2 [7,3]\nS3 0 V2 [7,4]", + "solutionText": "S1 0 V3 [7,7]\nS2 0 V2 [7,3]\nS3 0 V2 [7,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-121\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-122.json b/voi/data/voi-122.json new file mode 100644 index 0000000000000000000000000000000000000000..e30a59d713d5bf2660461fcc8c9a3e118cc808f6 --- /dev/null +++ b/voi/data/voi-122.json @@ -0,0 +1,202 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 1 + ], + [ + 3, + 4 + ], + [ + 1, + 4 + ], + [ + 1, + 1 + ] + ] + }, + { + "polygon": [ + [ + 3, + 5 + ], + [ + 3, + 2 + ], + [ + 4, + 2 + ], + [ + 4, + 5 + ] + ] + }, + { + "polygon": [ + [ + 3, + 3 + ], + [ + 3, + 6 + ], + [ + 1, + 6 + ], + [ + 1, + 3 + ] + ] + } + ], + "meta": { + "seed": 4203023, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.266667, + "contourComplexity": 12, + "connectedComponents": 1, + "fillRatio": 0.171875, + "difficultyScore": 0.422917, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 123, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-122/target.png", + "shapes": { + "S1": "../images/voi-122/shape_S1.png", + "S2": "../images/voi-122/shape_S2.png", + "S3": "../images/voi-122/shape_S3.png", + "S4": "../images/voi-122/shape_S4.png" + } + }, + "ID": "voi-122", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V3", + "grid": [ + 1, + 4 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V3", + "grid": [ + 4, + 2 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V3", + "grid": [ + 1, + 6 + ] + } + ] + }, + "legacy_answer": "S1 270 V3 [1,4]\nS3 90 V3 [4,2]\nS4 270 V3 [1,6]", + "solutionText": "S1 270 V3 [1,4]\nS3 90 V3 [4,2]\nS4 270 V3 [1,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-122\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-123.json b/voi/data/voi-123.json new file mode 100644 index 0000000000000000000000000000000000000000..4c20119e4745e505b35e68f5ef6640783a36e88c --- /dev/null +++ b/voi/data/voi-123.json @@ -0,0 +1,202 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 1 + ], + [ + 4, + 4 + ], + [ + 2, + 4 + ], + [ + 2, + 1 + ] + ] + }, + { + "polygon": [ + [ + 1, + 4 + ], + [ + 4, + 4 + ], + [ + 4, + 5 + ], + [ + 1, + 5 + ] + ] + }, + { + "polygon": [ + [ + 3, + 4 + ], + [ + 1, + 4 + ], + [ + 1, + 3 + ], + [ + 3, + 3 + ] + ] + } + ], + "meta": { + "seed": 4203024, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "contourComplexity": 11, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.491477, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 124, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-123/target.png", + "shapes": { + "S1": "../images/voi-123/shape_S1.png", + "S2": "../images/voi-123/shape_S2.png", + "S3": "../images/voi-123/shape_S3.png", + "S4": "../images/voi-123/shape_S4.png" + } + }, + "ID": "voi-123", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V2", + "grid": [ + 4, + 4 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V4", + "grid": [ + 1, + 5 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V4", + "grid": [ + 3, + 3 + ] + } + ] + }, + "legacy_answer": "S1 270 V2 [4,4]\nS2 0 V4 [1,5]\nS3 180 V4 [3,3]", + "solutionText": "S1 270 V2 [4,4]\nS2 0 V4 [1,5]\nS3 180 V4 [3,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-123\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-124.json b/voi/data/voi-124.json new file mode 100644 index 0000000000000000000000000000000000000000..ca84eae35d4256fdfa0541cc0485c56b3658bd90 --- /dev/null +++ b/voi/data/voi-124.json @@ -0,0 +1,218 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 4 + ], + [ + 2, + 1 + ], + [ + 4, + 1 + ], + [ + 4, + 4 + ] + ] + }, + { + "polygon": [ + [ + 2, + 1 + ], + [ + 2, + 3 + ], + [ + 0, + 3 + ], + [ + 0, + 1 + ] + ] + }, + { + "polygon": [ + [ + 5, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 1 + ], + [ + 5, + 1 + ] + ] + } + ], + "meta": { + "seed": 4203025, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.142857, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.1875, + "difficultyScore": 0.553571, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 125, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-124/target.png", + "shapes": { + "S1": "../images/voi-124/shape_S1.png", + "S2": "../images/voi-124/shape_S2.png", + "S3": "../images/voi-124/shape_S3.png", + "S4": "../images/voi-124/shape_S4.png" + } + }, + "ID": "voi-124", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V3", + "grid": [ + 4, + 1 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V4", + "grid": [ + 0, + 1 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V5", + "grid": [ + 4, + 1 + ] + } + ] + }, + "legacy_answer": "S1 90 V3 [4,1]\nS2 270 V4 [0,1]\nS4 180 V5 [4,1]", + "solutionText": "S1 90 V3 [4,1]\nS2 270 V4 [0,1]\nS4 180 V5 [4,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-124\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-125.json b/voi/data/voi-125.json new file mode 100644 index 0000000000000000000000000000000000000000..df7953f82736889dfe64289bc51fdc9cb9f18361 --- /dev/null +++ b/voi/data/voi-125.json @@ -0,0 +1,198 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 8 + ], + [ + 3, + 5 + ], + [ + 4, + 6 + ], + [ + 4, + 8 + ] + ] + }, + { + "polygon": [ + [ + 4, + 6 + ], + [ + 6, + 6 + ], + [ + 6, + 8 + ], + [ + 4, + 8 + ] + ] + }, + { + "polygon": [ + [ + 5, + 4 + ], + [ + 5, + 7 + ], + [ + 4, + 6 + ], + [ + 4, + 4 + ] + ] + } + ], + "meta": { + "seed": 4203026, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.117241, + "contourComplexity": 72, + "connectedComponents": 1, + "fillRatio": 0.125, + "difficultyScore": 0.781034, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 126, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-125/target.png", + "shapes": { + "S1": "../images/voi-125/shape_S1.png", + "S2": "../images/voi-125/shape_S2.png", + "S3": "../images/voi-125/shape_S3.png", + "S4": "../images/voi-125/shape_S4.png" + } + }, + "ID": "voi-125", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V4", + "grid": [ + 4, + 8 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V2", + "grid": [ + 6, + 6 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V1", + "grid": [ + 5, + 4 + ] + } + ] + }, + "legacy_answer": "S1 90 V4 [4,8]\nS2 0 V2 [6,6]\nS3 270 V1 [5,4]", + "solutionText": "S1 90 V4 [4,8]\nS2 0 V2 [6,6]\nS3 270 V1 [5,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-125\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-126.json b/voi/data/voi-126.json new file mode 100644 index 0000000000000000000000000000000000000000..03a54cecf26e2bed7ed7265ee7bf91ee842a44c7 --- /dev/null +++ b/voi/data/voi-126.json @@ -0,0 +1,202 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 2 + ], + [ + 3, + 3 + ], + [ + 1, + 3 + ], + [ + 1, + 2 + ] + ] + }, + { + "polygon": [ + [ + 4, + 3 + ], + [ + 1, + 3 + ], + [ + 1, + 1 + ], + [ + 4, + 1 + ] + ] + }, + { + "polygon": [ + [ + 7, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 1 + ], + [ + 7, + 1 + ] + ] + } + ], + "meta": { + "seed": 4203027, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "contourComplexity": 6, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.530357, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 127, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-126/target.png", + "shapes": { + "S1": "../images/voi-126/shape_S1.png", + "S2": "../images/voi-126/shape_S2.png", + "S3": "../images/voi-126/shape_S3.png", + "S4": "../images/voi-126/shape_S4.png" + } + }, + "ID": "voi-126", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V1", + "grid": [ + 3, + 2 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V2", + "grid": [ + 1, + 3 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V4", + "grid": [ + 7, + 1 + ] + } + ] + }, + "legacy_answer": "S1 270 V1 [3,2]\nS3 180 V2 [1,3]\nS4 180 V4 [7,1]", + "solutionText": "S1 270 V1 [3,2]\nS3 180 V2 [1,3]\nS4 180 V4 [7,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-126\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-127.json b/voi/data/voi-127.json new file mode 100644 index 0000000000000000000000000000000000000000..edc7f9f72eefc464e7e312dd63287a4ffb02a46d --- /dev/null +++ b/voi/data/voi-127.json @@ -0,0 +1,214 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 6 + ], + [ + 3, + 3 + ], + [ + 4, + 4 + ], + [ + 4, + 6 + ] + ] + }, + { + "polygon": [ + [ + 3, + 1 + ], + [ + 3, + 3 + ], + [ + 2, + 3 + ], + [ + 2, + 2 + ], + [ + 0, + 2 + ], + [ + 0, + 1 + ] + ] + }, + { + "polygon": [ + [ + 1, + 4 + ], + [ + 1, + 2 + ], + [ + 3, + 2 + ], + [ + 3, + 4 + ] + ] + } + ], + "meta": { + "seed": 4203028, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.189911, + "contourComplexity": 42, + "connectedComponents": 1, + "fillRatio": 0.133301, + "difficultyScore": 0.473755, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 128, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-127/target.png", + "shapes": { + "S1": "../images/voi-127/shape_S1.png", + "S2": "../images/voi-127/shape_S2.png", + "S3": "../images/voi-127/shape_S3.png", + "S4": "../images/voi-127/shape_S4.png" + } + }, + "ID": "voi-127", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V4", + "grid": [ + 4, + 6 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V4", + "grid": [ + 2, + 2 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V3", + "grid": [ + 3, + 2 + ] + } + ] + }, + "legacy_answer": "S1 90 V4 [4,6]\nS2 270 V4 [2,2]\nS3 90 V3 [3,2]", + "solutionText": "S1 90 V4 [4,6]\nS2 270 V4 [2,2]\nS3 90 V3 [3,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-127\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-128.json b/voi/data/voi-128.json new file mode 100644 index 0000000000000000000000000000000000000000..b642c62a95775af9d41b4a3f981355e2a1ede039 --- /dev/null +++ b/voi/data/voi-128.json @@ -0,0 +1,202 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 2 + ], + [ + 3, + 5 + ], + [ + 2, + 4 + ], + [ + 2, + 2 + ] + ] + }, + { + "polygon": [ + [ + 3, + 2 + ], + [ + 0, + 2 + ], + [ + 0, + 0 + ], + [ + 3, + 0 + ] + ] + }, + { + "polygon": [ + [ + 1, + 1 + ], + [ + 2, + 1 + ], + [ + 2, + 3 + ], + [ + 1, + 3 + ] + ] + } + ], + "meta": { + "seed": 4203029, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.189911, + "contourComplexity": 43, + "connectedComponents": 1, + "fillRatio": 0.133301, + "difficultyScore": 0.473755, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 129, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-128/target.png", + "shapes": { + "S1": "../images/voi-128/shape_S1.png", + "S2": "../images/voi-128/shape_S2.png", + "S3": "../images/voi-128/shape_S3.png", + "S4": "../images/voi-128/shape_S4.png" + } + }, + "ID": "voi-128", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V3", + "grid": [ + 2, + 4 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V2", + "grid": [ + 0, + 2 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V1", + "grid": [ + 1, + 1 + ] + } + ] + }, + "legacy_answer": "S1 270 V3 [2,4]\nS2 180 V2 [0,2]\nS4 0 V1 [1,1]", + "solutionText": "S1 270 V3 [2,4]\nS2 180 V2 [0,2]\nS4 0 V1 [1,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-128\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-129.json b/voi/data/voi-129.json new file mode 100644 index 0000000000000000000000000000000000000000..ff66f08e867db45575aa65818dd8aa6e79719897 --- /dev/null +++ b/voi/data/voi-129.json @@ -0,0 +1,194 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 4 + ], + [ + 4, + 4 + ], + [ + 3, + 5 + ] + ] + }, + { + "polygon": [ + [ + 4, + 7 + ], + [ + 4, + 5 + ], + [ + 5, + 5 + ], + [ + 5, + 7 + ] + ] + }, + { + "polygon": [ + [ + 4, + 4 + ], + [ + 4, + 7 + ], + [ + 2, + 7 + ], + [ + 2, + 4 + ] + ] + } + ], + "meta": { + "seed": 4203030, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.124542, + "contourComplexity": 38, + "connectedComponents": 1, + "fillRatio": 0.116699, + "difficultyScore": 0.768433, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 130, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-129/target.png", + "shapes": { + "S1": "../images/voi-129/shape_S1.png", + "S2": "../images/voi-129/shape_S2.png", + "S3": "../images/voi-129/shape_S3.png", + "S4": "../images/voi-129/shape_S4.png" + } + }, + "ID": "voi-129", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V3", + "grid": [ + 3, + 5 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V1", + "grid": [ + 4, + 7 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V1", + "grid": [ + 4, + 4 + ] + } + ] + }, + "legacy_answer": "S1 0 V3 [3,5]\nS3 90 V1 [4,7]\nS4 270 V1 [4,4]", + "solutionText": "S1 0 V3 [3,5]\nS3 90 V1 [4,7]\nS4 270 V1 [4,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-129\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-130.json b/voi/data/voi-130.json new file mode 100644 index 0000000000000000000000000000000000000000..8f66f8fd3b4a801d9e89638043f7e165982d73e7 --- /dev/null +++ b/voi/data/voi-130.json @@ -0,0 +1,202 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 1 + ], + [ + 8, + 1 + ], + [ + 8, + 3 + ], + [ + 5, + 3 + ] + ] + }, + { + "polygon": [ + [ + 6, + 3 + ], + [ + 7, + 3 + ], + [ + 7, + 4 + ], + [ + 6, + 4 + ] + ] + }, + { + "polygon": [ + [ + 5, + 3 + ], + [ + 7, + 3 + ], + [ + 7, + 5 + ], + [ + 5, + 5 + ] + ] + } + ], + "meta": { + "seed": 4203031, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "contourComplexity": 8, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.491477, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 131, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-130/target.png", + "shapes": { + "S1": "../images/voi-130/shape_S1.png", + "S2": "../images/voi-130/shape_S2.png", + "S3": "../images/voi-130/shape_S3.png", + "S4": "../images/voi-130/shape_S4.png" + } + }, + "ID": "voi-130", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V1", + "grid": [ + 5, + 1 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V2", + "grid": [ + 7, + 3 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V4", + "grid": [ + 5, + 5 + ] + } + ] + }, + "legacy_answer": "S1 0 V1 [5,1]\nS3 0 V2 [7,3]\nS4 0 V4 [5,5]", + "solutionText": "S1 0 V1 [5,1]\nS3 0 V2 [7,3]\nS4 0 V4 [5,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-130\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-131.json b/voi/data/voi-131.json new file mode 100644 index 0000000000000000000000000000000000000000..f1308bf7e299081dfb122f9816c84a5399434bc3 --- /dev/null +++ b/voi/data/voi-131.json @@ -0,0 +1,190 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 6 + ], + [ + 4, + 6 + ], + [ + 4, + 8 + ], + [ + 2, + 8 + ] + ] + }, + { + "polygon": [ + [ + 1, + 5 + ], + [ + 2, + 5 + ], + [ + 2, + 8 + ], + [ + 1, + 8 + ] + ] + }, + { + "polygon": [ + [ + 3, + 6 + ], + [ + 3, + 7 + ], + [ + 2, + 6 + ] + ] + } + ], + "meta": { + "seed": 4203032, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.141079, + "contourComplexity": 38, + "connectedComponents": 1, + "fillRatio": 0.101074, + "difficultyScore": 0.733536, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 132, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-131/target.png", + "shapes": { + "S1": "../images/voi-131/shape_S1.png", + "S2": "../images/voi-131/shape_S2.png", + "S3": "../images/voi-131/shape_S3.png", + "S4": "../images/voi-131/shape_S4.png" + } + }, + "ID": "voi-131", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V1", + "grid": [ + 2, + 6 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V3", + "grid": [ + 2, + 8 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V1", + "grid": [ + 3, + 6 + ] + } + ] + }, + "legacy_answer": "S1 0 V1 [2,6]\nS2 0 V3 [2,8]\nS4 270 V1 [3,6]", + "solutionText": "S1 0 V1 [2,6]\nS2 0 V3 [2,8]\nS4 270 V1 [3,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-131\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S3: V1=[0,0], V2=[1,0], V3=[0,1]\n- S4: V1=[0,0], V2=[1,0], V3=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-132.json b/voi/data/voi-132.json new file mode 100644 index 0000000000000000000000000000000000000000..809b4edd1be47abd1cc768c0bf74230f9659aae9 --- /dev/null +++ b/voi/data/voi-132.json @@ -0,0 +1,202 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 3 + ], + [ + 2, + 5 + ], + [ + 1, + 5 + ], + [ + 1, + 3 + ] + ] + }, + { + "polygon": [ + [ + 2, + 7 + ], + [ + 2, + 4 + ], + [ + 4, + 4 + ], + [ + 4, + 7 + ] + ] + }, + { + "polygon": [ + [ + 3, + 6 + ], + [ + 0, + 6 + ], + [ + 1, + 5 + ], + [ + 3, + 5 + ] + ] + } + ], + "meta": { + "seed": 4203033, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.189911, + "contourComplexity": 45, + "connectedComponents": 1, + "fillRatio": 0.133301, + "difficultyScore": 0.473755, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 133, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-132/target.png", + "shapes": { + "S1": "../images/voi-132/shape_S1.png", + "S2": "../images/voi-132/shape_S2.png", + "S3": "../images/voi-132/shape_S3.png", + "S4": "../images/voi-132/shape_S4.png" + } + }, + "ID": "voi-132", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V4", + "grid": [ + 1, + 3 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V4", + "grid": [ + 4, + 7 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V4", + "grid": [ + 3, + 5 + ] + } + ] + }, + "legacy_answer": "S1 270 V4 [1,3]\nS3 90 V4 [4,7]\nS4 180 V4 [3,5]", + "solutionText": "S1 270 V4 [1,3]\nS3 90 V4 [4,7]\nS4 180 V4 [3,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-132\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-133.json b/voi/data/voi-133.json new file mode 100644 index 0000000000000000000000000000000000000000..3ba9af41266b8e99dec3262601cc5c5b5e092611 --- /dev/null +++ b/voi/data/voi-133.json @@ -0,0 +1,230 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 6 + ], + [ + 0, + 6 + ], + [ + 0, + 5 + ], + [ + 1, + 5 + ], + [ + 1, + 3 + ], + [ + 2, + 3 + ] + ] + }, + { + "polygon": [ + [ + 3, + 5 + ], + [ + 2, + 5 + ], + [ + 2, + 3 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 0, + 7 + ], + [ + 0, + 5 + ], + [ + 1, + 5 + ], + [ + 1, + 6 + ], + [ + 3, + 6 + ], + [ + 3, + 7 + ] + ] + } + ], + "meta": { + "seed": 4203034, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.125, + "difficultyScore": 0.45, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 134, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-133/target.png", + "shapes": { + "S1": "../images/voi-133/shape_S1.png", + "S2": "../images/voi-133/shape_S2.png", + "S3": "../images/voi-133/shape_S3.png", + "S4": "../images/voi-133/shape_S4.png" + } + }, + "ID": "voi-133", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V1", + "grid": [ + 2, + 6 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V1", + "grid": [ + 3, + 5 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V1", + "grid": [ + 0, + 7 + ] + } + ] + }, + "legacy_answer": "S1 180 V1 [2,6]\nS3 180 V1 [3,5]\nS4 90 V1 [0,7]", + "solutionText": "S1 180 V1 [2,6]\nS3 180 V1 [3,5]\nS4 90 V1 [0,7]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-133\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-134.json b/voi/data/voi-134.json new file mode 100644 index 0000000000000000000000000000000000000000..4af0ff625c4ee93504d8d9afb347fd54f70803a9 --- /dev/null +++ b/voi/data/voi-134.json @@ -0,0 +1,202 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 1, + 2 + ], + [ + 4, + 2 + ], + [ + 4, + 4 + ], + [ + 1, + 4 + ] + ] + }, + { + "polygon": [ + [ + 2, + 6 + ], + [ + 0, + 6 + ], + [ + 0, + 4 + ], + [ + 2, + 4 + ] + ] + }, + { + "polygon": [ + [ + 2, + 6 + ], + [ + 2, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 6 + ] + ] + } + ], + "meta": { + "seed": 4203035, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.25, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.1875, + "difficultyScore": 0.325, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 135, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-134/target.png", + "shapes": { + "S1": "../images/voi-134/shape_S1.png", + "S2": "../images/voi-134/shape_S2.png", + "S3": "../images/voi-134/shape_S3.png", + "S4": "../images/voi-134/shape_S4.png" + } + }, + "ID": "voi-134", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V1", + "grid": [ + 1, + 2 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V4", + "grid": [ + 2, + 4 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V1", + "grid": [ + 2, + 6 + ] + } + ] + }, + "legacy_answer": "S1 0 V1 [1,2]\nS2 180 V4 [2,4]\nS4 90 V1 [2,6]", + "solutionText": "S1 0 V1 [1,2]\nS2 180 V4 [2,4]\nS4 90 V1 [2,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-134\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-135.json b/voi/data/voi-135.json new file mode 100644 index 0000000000000000000000000000000000000000..bc687f393d8596cc99b044ccb3ce25d00fcfceac --- /dev/null +++ b/voi/data/voi-135.json @@ -0,0 +1,202 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 5 + ], + [ + 5, + 5 + ], + [ + 5, + 7 + ], + [ + 3, + 7 + ] + ] + }, + { + "polygon": [ + [ + 4, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 4 + ], + [ + 4, + 4 + ] + ] + }, + { + "polygon": [ + [ + 4, + 6 + ], + [ + 4, + 3 + ], + [ + 6, + 3 + ], + [ + 6, + 6 + ] + ] + } + ], + "meta": { + "seed": 4203036, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "contourComplexity": 12, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.491477, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 136, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-135/target.png", + "shapes": { + "S1": "../images/voi-135/shape_S1.png", + "S2": "../images/voi-135/shape_S2.png", + "S3": "../images/voi-135/shape_S3.png", + "S4": "../images/voi-135/shape_S4.png" + } + }, + "ID": "voi-135", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V3", + "grid": [ + 5, + 7 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V4", + "grid": [ + 4, + 4 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V2", + "grid": [ + 4, + 3 + ] + } + ] + }, + "legacy_answer": "S1 0 V3 [5,7]\nS2 180 V4 [4,4]\nS3 90 V2 [4,3]", + "solutionText": "S1 0 V3 [5,7]\nS2 180 V4 [4,4]\nS3 90 V2 [4,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-135\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-136.json b/voi/data/voi-136.json new file mode 100644 index 0000000000000000000000000000000000000000..84df746956a2cec8822775478b4ea334f099fa21 --- /dev/null +++ b/voi/data/voi-136.json @@ -0,0 +1,190 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 7 + ], + [ + 2, + 7 + ], + [ + 4, + 5 + ] + ] + }, + { + "polygon": [ + [ + 3, + 6 + ], + [ + 3, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 6 + ] + ] + }, + { + "polygon": [ + [ + 3, + 6 + ], + [ + 2, + 6 + ], + [ + 2, + 3 + ], + [ + 3, + 3 + ] + ] + } + ], + "meta": { + "seed": 4203037, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.131783, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.109375, + "difficultyScore": 0.754118, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 137, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-136/target.png", + "shapes": { + "S1": "../images/voi-136/shape_S1.png", + "S2": "../images/voi-136/shape_S2.png", + "S3": "../images/voi-136/shape_S3.png", + "S4": "../images/voi-136/shape_S4.png" + } + }, + "ID": "voi-136", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V2", + "grid": [ + 2, + 7 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V4", + "grid": [ + 4, + 6 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V3", + "grid": [ + 2, + 3 + ] + } + ] + }, + "legacy_answer": "S1 180 V2 [2,7]\nS2 90 V4 [4,6]\nS4 180 V3 [2,3]", + "solutionText": "S1 180 V2 [2,7]\nS2 90 V4 [4,6]\nS4 180 V3 [2,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-136\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-137.json b/voi/data/voi-137.json new file mode 100644 index 0000000000000000000000000000000000000000..9dfaf8ca741a3c557e5c7eb8d170e6e82e281cc5 --- /dev/null +++ b/voi/data/voi-137.json @@ -0,0 +1,198 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 3 + ], + [ + 6, + 3 + ], + [ + 6, + 4 + ], + [ + 4, + 4 + ] + ] + }, + { + "polygon": [ + [ + 3, + 2 + ], + [ + 5, + 2 + ], + [ + 5, + 4 + ], + [ + 3, + 4 + ] + ] + }, + { + "polygon": [ + [ + 8, + 3 + ], + [ + 5, + 3 + ], + [ + 5, + 2 + ], + [ + 8, + 2 + ] + ] + } + ], + "meta": { + "seed": 4203038, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.109375, + "difficultyScore": 0.392361, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 138, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-137/target.png", + "shapes": { + "S1": "../images/voi-137/shape_S1.png", + "S2": "../images/voi-137/shape_S2.png", + "S3": "../images/voi-137/shape_S3.png", + "S4": "../images/voi-137/shape_S4.png" + } + }, + "ID": "voi-137", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V2", + "grid": [ + 6, + 3 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V1", + "grid": [ + 3, + 2 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V2", + "grid": [ + 5, + 3 + ] + } + ] + }, + "legacy_answer": "S1 0 V2 [6,3]\nS2 0 V1 [3,2]\nS4 180 V2 [5,3]", + "solutionText": "S1 0 V2 [6,3]\nS2 0 V1 [3,2]\nS4 180 V2 [5,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-137\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[0,1]\n- S4: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-138.json b/voi/data/voi-138.json new file mode 100644 index 0000000000000000000000000000000000000000..c74bd974922af2d80e8aff13cd6a51ea565d8d3f --- /dev/null +++ b/voi/data/voi-138.json @@ -0,0 +1,202 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 1 + ], + [ + 7, + 1 + ], + [ + 7, + 3 + ], + [ + 4, + 3 + ] + ] + }, + { + "polygon": [ + [ + 3, + 1 + ], + [ + 5, + 1 + ], + [ + 5, + 2 + ], + [ + 3, + 2 + ] + ] + }, + { + "polygon": [ + [ + 4, + 2 + ], + [ + 4, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 2 + ] + ] + } + ], + "meta": { + "seed": 4203039, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.491477, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 139, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-138/target.png", + "shapes": { + "S1": "../images/voi-138/shape_S1.png", + "S2": "../images/voi-138/shape_S2.png", + "S3": "../images/voi-138/shape_S3.png", + "S4": "../images/voi-138/shape_S4.png" + } + }, + "ID": "voi-138", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V3", + "grid": [ + 7, + 3 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V4", + "grid": [ + 3, + 2 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V2", + "grid": [ + 4, + 5 + ] + } + ] + }, + "legacy_answer": "S1 0 V3 [7,3]\nS3 0 V4 [3,2]\nS4 270 V2 [4,5]", + "solutionText": "S1 0 V3 [7,3]\nS3 0 V4 [3,2]\nS4 270 V2 [4,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-138\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-139.json b/voi/data/voi-139.json new file mode 100644 index 0000000000000000000000000000000000000000..ed77151d545ea6797c585ac3af76819e85c6d712 --- /dev/null +++ b/voi/data/voi-139.json @@ -0,0 +1,234 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 8 + ], + [ + 3, + 8 + ], + [ + 3, + 7 + ], + [ + 4, + 7 + ], + [ + 4, + 5 + ], + [ + 5, + 5 + ] + ] + }, + { + "polygon": [ + [ + 8, + 4 + ], + [ + 8, + 6 + ], + [ + 7, + 6 + ], + [ + 7, + 5 + ], + [ + 5, + 5 + ], + [ + 5, + 4 + ] + ] + }, + { + "polygon": [ + [ + 8, + 6 + ], + [ + 5, + 6 + ], + [ + 5, + 5 + ], + [ + 8, + 5 + ] + ] + } + ], + "meta": { + "seed": 4203040, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "contourComplexity": 12, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.491477, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 140, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-139/target.png", + "shapes": { + "S1": "../images/voi-139/shape_S1.png", + "S2": "../images/voi-139/shape_S2.png", + "S3": "../images/voi-139/shape_S3.png", + "S4": "../images/voi-139/shape_S4.png" + } + }, + "ID": "voi-139", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 180, + "vertex": "V2", + "grid": [ + 3, + 8 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V6", + "grid": [ + 5, + 4 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V3", + "grid": [ + 5, + 5 + ] + } + ] + }, + "legacy_answer": "S2 180 V2 [3,8]\nS3 270 V6 [5,4]\nS4 180 V3 [5,5]", + "solutionText": "S2 180 V2 [3,8]\nS3 270 V6 [5,4]\nS4 180 V3 [5,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-139\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-140.json b/voi/data/voi-140.json new file mode 100644 index 0000000000000000000000000000000000000000..b68f7cd9dc3ec288b77a56f90e9259e52ba774d1 --- /dev/null +++ b/voi/data/voi-140.json @@ -0,0 +1,218 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 7 + ], + [ + 5, + 5 + ], + [ + 6, + 5 + ], + [ + 6, + 6 + ], + [ + 8, + 6 + ], + [ + 8, + 7 + ] + ] + }, + { + "polygon": [ + [ + 7, + 4 + ], + [ + 4, + 4 + ], + [ + 5, + 3 + ], + [ + 7, + 3 + ] + ] + }, + { + "polygon": [ + [ + 5, + 4 + ], + [ + 7, + 4 + ], + [ + 7, + 6 + ], + [ + 5, + 6 + ] + ] + } + ], + "meta": { + "seed": 4203041, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.189911, + "contourComplexity": 42, + "connectedComponents": 1, + "fillRatio": 0.133301, + "difficultyScore": 0.473755, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 141, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-140/target.png", + "shapes": { + "S1": "../images/voi-140/shape_S1.png", + "S2": "../images/voi-140/shape_S2.png", + "S3": "../images/voi-140/shape_S3.png", + "S4": "../images/voi-140/shape_S4.png" + } + }, + "ID": "voi-140", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V3", + "grid": [ + 6, + 5 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V3", + "grid": [ + 5, + 3 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V4", + "grid": [ + 5, + 6 + ] + } + ] + }, + "legacy_answer": "S1 90 V3 [6,5]\nS2 180 V3 [5,3]\nS4 0 V4 [5,6]", + "solutionText": "S1 90 V3 [6,5]\nS2 180 V3 [5,3]\nS4 0 V4 [5,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-140\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S2: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-141.json b/voi/data/voi-141.json new file mode 100644 index 0000000000000000000000000000000000000000..81fa57e488edbebffee1dca0326d7d9c8c2de76d --- /dev/null +++ b/voi/data/voi-141.json @@ -0,0 +1,190 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 4 + ], + [ + 6, + 3 + ], + [ + 8, + 3 + ], + [ + 8, + 4 + ] + ] + }, + { + "polygon": [ + [ + 8, + 4 + ], + [ + 8, + 6 + ], + [ + 6, + 4 + ] + ] + }, + { + "polygon": [ + [ + 6, + 5 + ], + [ + 8, + 5 + ], + [ + 8, + 7 + ], + [ + 6, + 7 + ] + ] + } + ], + "meta": { + "seed": 4203042, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.131783, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.109375, + "difficultyScore": 0.754118, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 142, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-141/target.png", + "shapes": { + "S1": "../images/voi-141/shape_S1.png", + "S2": "../images/voi-141/shape_S2.png", + "S3": "../images/voi-141/shape_S3.png", + "S4": "../images/voi-141/shape_S4.png" + } + }, + "ID": "voi-141", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V2", + "grid": [ + 6, + 3 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V3", + "grid": [ + 6, + 4 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V2", + "grid": [ + 8, + 5 + ] + } + ] + }, + "legacy_answer": "S1 90 V2 [6,3]\nS2 270 V3 [6,4]\nS3 0 V2 [8,5]", + "solutionText": "S1 90 V2 [6,3]\nS2 270 V3 [6,4]\nS3 0 V2 [8,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-141\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-142.json b/voi/data/voi-142.json new file mode 100644 index 0000000000000000000000000000000000000000..32b881b9e502ab2436ac5fc5c240e66bc5556715 --- /dev/null +++ b/voi/data/voi-142.json @@ -0,0 +1,202 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 4 + ], + [ + 6, + 7 + ], + [ + 4, + 7 + ], + [ + 4, + 4 + ] + ] + }, + { + "polygon": [ + [ + 3, + 3 + ], + [ + 6, + 3 + ], + [ + 5, + 4 + ], + [ + 3, + 4 + ] + ] + }, + { + "polygon": [ + [ + 5, + 6 + ], + [ + 5, + 5 + ], + [ + 6, + 5 + ], + [ + 6, + 6 + ] + ] + } + ], + "meta": { + "seed": 4203043, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.209836, + "contourComplexity": 42, + "connectedComponents": 1, + "fillRatio": 0.117676, + "difficultyScore": 0.425304, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 143, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-142/target.png", + "shapes": { + "S1": "../images/voi-142/shape_S1.png", + "S2": "../images/voi-142/shape_S2.png", + "S3": "../images/voi-142/shape_S3.png", + "S4": "../images/voi-142/shape_S4.png" + } + }, + "ID": "voi-142", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V4", + "grid": [ + 4, + 4 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V4", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V3", + "grid": [ + 6, + 5 + ] + } + ] + }, + "legacy_answer": "S1 270 V4 [4,4]\nS2 0 V4 [3,4]\nS3 90 V3 [6,5]", + "solutionText": "S1 270 V4 [4,4]\nS2 0 V4 [3,4]\nS3 90 V3 [6,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-142\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-143.json b/voi/data/voi-143.json new file mode 100644 index 0000000000000000000000000000000000000000..1f795e49cf898c7d3e3af1d7deea3d334a520542 --- /dev/null +++ b/voi/data/voi-143.json @@ -0,0 +1,218 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 8, + 4 + ], + [ + 6, + 4 + ], + [ + 6, + 3 + ], + [ + 7, + 3 + ], + [ + 7, + 1 + ], + [ + 8, + 1 + ] + ] + }, + { + "polygon": [ + [ + 5, + 4 + ], + [ + 8, + 4 + ], + [ + 8, + 6 + ], + [ + 5, + 6 + ] + ] + }, + { + "polygon": [ + [ + 6, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 3 + ], + [ + 6, + 3 + ] + ] + } + ], + "meta": { + "seed": 4203044, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.125, + "contourComplexity": 13, + "connectedComponents": 1, + "fillRatio": 0.21875, + "difficultyScore": 0.5625, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 144, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-143/target.png", + "shapes": { + "S1": "../images/voi-143/shape_S1.png", + "S2": "../images/voi-143/shape_S2.png", + "S3": "../images/voi-143/shape_S3.png", + "S4": "../images/voi-143/shape_S4.png" + } + }, + "ID": "voi-143", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V5", + "grid": [ + 7, + 1 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V3", + "grid": [ + 8, + 6 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V4", + "grid": [ + 6, + 3 + ] + } + ] + }, + "legacy_answer": "S1 180 V5 [7,1]\nS2 0 V3 [8,6]\nS3 180 V4 [6,3]", + "solutionText": "S1 180 V5 [7,1]\nS2 0 V3 [8,6]\nS3 180 V4 [6,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-143\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-144.json b/voi/data/voi-144.json new file mode 100644 index 0000000000000000000000000000000000000000..1144eb432105d04263977435af7ad87b6713a76b --- /dev/null +++ b/voi/data/voi-144.json @@ -0,0 +1,202 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 4 + ], + [ + 4, + 1 + ], + [ + 6, + 1 + ], + [ + 6, + 4 + ] + ] + }, + { + "polygon": [ + [ + 4, + 0 + ], + [ + 4, + 2 + ], + [ + 2, + 2 + ], + [ + 2, + 0 + ] + ] + }, + { + "polygon": [ + [ + 3, + 3 + ], + [ + 3, + 2 + ], + [ + 5, + 2 + ], + [ + 5, + 3 + ] + ] + } + ], + "meta": { + "seed": 4203045, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.166667, + "contourComplexity": 15, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.520833, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 145, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-144/target.png", + "shapes": { + "S1": "../images/voi-144/shape_S1.png", + "S2": "../images/voi-144/shape_S2.png", + "S3": "../images/voi-144/shape_S3.png", + "S4": "../images/voi-144/shape_S4.png" + } + }, + "ID": "voi-144", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 90, + "vertex": "V2", + "grid": [ + 4, + 1 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V3", + "grid": [ + 2, + 2 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V3", + "grid": [ + 5, + 2 + ] + } + ] + }, + "legacy_answer": "S2 90 V2 [4,1]\nS3 270 V3 [2,2]\nS4 90 V3 [5,2]", + "solutionText": "S2 90 V2 [4,1]\nS3 270 V3 [2,2]\nS4 90 V3 [5,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-144\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-145.json b/voi/data/voi-145.json new file mode 100644 index 0000000000000000000000000000000000000000..a233a19a4fa967bc47377daa1ea6bbaa044b2e84 --- /dev/null +++ b/voi/data/voi-145.json @@ -0,0 +1,218 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 3 + ], + [ + 7, + 3 + ], + [ + 7, + 5 + ], + [ + 4, + 5 + ] + ] + }, + { + "polygon": [ + [ + 4, + 4 + ], + [ + 4, + 6 + ], + [ + 3, + 6 + ], + [ + 3, + 5 + ], + [ + 1, + 5 + ], + [ + 1, + 4 + ] + ] + }, + { + "polygon": [ + [ + 1, + 6 + ], + [ + 1, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 6 + ] + ] + } + ], + "meta": { + "seed": 4203046, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.153846, + "contourComplexity": 8, + "connectedComponents": 1, + "fillRatio": 0.171875, + "difficultyScore": 0.540865, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 146, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-145/target.png", + "shapes": { + "S1": "../images/voi-145/shape_S1.png", + "S2": "../images/voi-145/shape_S2.png", + "S3": "../images/voi-145/shape_S3.png", + "S4": "../images/voi-145/shape_S4.png" + } + }, + "ID": "voi-145", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V3", + "grid": [ + 7, + 5 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V4", + "grid": [ + 3, + 5 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V1", + "grid": [ + 1, + 6 + ] + } + ] + }, + "legacy_answer": "S1 0 V3 [7,5]\nS2 270 V4 [3,5]\nS3 90 V1 [1,6]", + "solutionText": "S1 0 V3 [7,5]\nS2 270 V4 [3,5]\nS3 90 V1 [1,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-145\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-146.json b/voi/data/voi-146.json new file mode 100644 index 0000000000000000000000000000000000000000..1ae71ea5b04a9c1de9265a507993149fd784e610 --- /dev/null +++ b/voi/data/voi-146.json @@ -0,0 +1,230 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 3 + ], + [ + 6, + 5 + ], + [ + 5, + 5 + ], + [ + 5, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 6, + 1 + ], + [ + 8, + 1 + ], + [ + 8, + 2 + ], + [ + 7, + 2 + ], + [ + 7, + 4 + ], + [ + 6, + 4 + ] + ] + }, + { + "polygon": [ + [ + 5, + 4 + ], + [ + 7, + 4 + ], + [ + 7, + 5 + ], + [ + 5, + 5 + ] + ] + } + ], + "meta": { + "seed": 4203047, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.125, + "difficultyScore": 0.45, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 147, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-146/target.png", + "shapes": { + "S1": "../images/voi-146/shape_S1.png", + "S2": "../images/voi-146/shape_S2.png", + "S3": "../images/voi-146/shape_S3.png", + "S4": "../images/voi-146/shape_S4.png" + } + }, + "ID": "voi-146", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V1", + "grid": [ + 6, + 3 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V1", + "grid": [ + 6, + 1 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V2", + "grid": [ + 7, + 4 + ] + } + ] + }, + "legacy_answer": "S1 270 V1 [6,3]\nS2 0 V1 [6,1]\nS4 0 V2 [7,4]", + "solutionText": "S1 270 V1 [6,3]\nS2 0 V1 [6,1]\nS4 0 V2 [7,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-146\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-147.json b/voi/data/voi-147.json new file mode 100644 index 0000000000000000000000000000000000000000..107b08fabf031dbc7b5f38b80390aeb9d7ca4e64 --- /dev/null +++ b/voi/data/voi-147.json @@ -0,0 +1,234 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 2 + ], + [ + 6, + 2 + ], + [ + 6, + 3 + ], + [ + 5, + 3 + ], + [ + 5, + 5 + ], + [ + 4, + 5 + ] + ] + }, + { + "polygon": [ + [ + 8, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 2 + ], + [ + 8, + 2 + ] + ] + }, + { + "polygon": [ + [ + 4, + 3 + ], + [ + 2, + 3 + ], + [ + 2, + 2 + ], + [ + 3, + 2 + ], + [ + 3, + 0 + ], + [ + 4, + 0 + ] + ] + } + ], + "meta": { + "seed": 4203048, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.142857, + "contourComplexity": 16, + "connectedComponents": 1, + "fillRatio": 0.1875, + "difficultyScore": 0.553571, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 148, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-147/target.png", + "shapes": { + "S1": "../images/voi-147/shape_S1.png", + "S2": "../images/voi-147/shape_S2.png", + "S3": "../images/voi-147/shape_S3.png", + "S4": "../images/voi-147/shape_S4.png" + } + }, + "ID": "voi-147", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V2", + "grid": [ + 6, + 2 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V3", + "grid": [ + 5, + 2 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V6", + "grid": [ + 4, + 0 + ] + } + ] + }, + "legacy_answer": "S1 0 V2 [6,2]\nS2 180 V3 [5,2]\nS4 180 V6 [4,0]", + "solutionText": "S1 0 V2 [6,2]\nS2 180 V3 [5,2]\nS4 180 V6 [4,0]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-147\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-148.json b/voi/data/voi-148.json new file mode 100644 index 0000000000000000000000000000000000000000..aaf24e7162b632896ef6bcb4ff02867dbfbb8822 --- /dev/null +++ b/voi/data/voi-148.json @@ -0,0 +1,214 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 6 + ], + [ + 1, + 6 + ], + [ + 1, + 5 + ], + [ + 2, + 5 + ], + [ + 2, + 3 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 1, + 1 + ], + [ + 1, + 4 + ], + [ + 0, + 4 + ], + [ + 0, + 1 + ] + ] + }, + { + "polygon": [ + [ + 3, + 2 + ], + [ + 3, + 5 + ], + [ + 1, + 5 + ], + [ + 1, + 2 + ] + ] + } + ], + "meta": { + "seed": 4203049, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.307692, + "contourComplexity": 12, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.649519, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 149, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-148/target.png", + "shapes": { + "S1": "../images/voi-148/shape_S1.png", + "S2": "../images/voi-148/shape_S2.png", + "S3": "../images/voi-148/shape_S3.png", + "S4": "../images/voi-148/shape_S4.png" + } + }, + "ID": "voi-148", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V6", + "grid": [ + 3, + 3 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V4", + "grid": [ + 0, + 1 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V2", + "grid": [ + 3, + 5 + ] + } + ] + }, + "legacy_answer": "S1 180 V6 [3,3]\nS3 270 V4 [0,1]\nS4 270 V2 [3,5]", + "solutionText": "S1 180 V6 [3,3]\nS3 270 V4 [0,1]\nS4 270 V2 [3,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-148\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S2: V1=[0,0], V2=[1,0], V3=[0,1]\n- S3: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-149.json b/voi/data/voi-149.json new file mode 100644 index 0000000000000000000000000000000000000000..0d47df57ff17992936a7148c47f770a53b186c05 --- /dev/null +++ b/voi/data/voi-149.json @@ -0,0 +1,218 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 6 + ], + [ + 4, + 3 + ], + [ + 6, + 3 + ], + [ + 6, + 6 + ] + ] + }, + { + "polygon": [ + [ + 7, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 2 + ], + [ + 7, + 2 + ] + ] + }, + { + "polygon": [ + [ + 5, + 1 + ], + [ + 7, + 1 + ], + [ + 7, + 2 + ], + [ + 6, + 2 + ], + [ + 6, + 4 + ], + [ + 5, + 4 + ] + ] + } + ], + "meta": { + "seed": 4203050, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.530357, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 150, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-149/target.png", + "shapes": { + "S1": "../images/voi-149/shape_S1.png", + "S2": "../images/voi-149/shape_S2.png", + "S3": "../images/voi-149/shape_S3.png", + "S4": "../images/voi-149/shape_S4.png" + } + }, + "ID": "voi-149", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V1", + "grid": [ + 4, + 6 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V4", + "grid": [ + 7, + 2 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V1", + "grid": [ + 5, + 1 + ] + } + ] + }, + "legacy_answer": "S1 90 V1 [4,6]\nS3 180 V4 [7,2]\nS4 0 V1 [5,1]", + "solutionText": "S1 90 V1 [4,6]\nS3 180 V4 [7,2]\nS4 0 V1 [5,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-149\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-150.json b/voi/data/voi-150.json new file mode 100644 index 0000000000000000000000000000000000000000..a123b0696e9c8387d35ef917ef6c59ac2c2488e5 --- /dev/null +++ b/voi/data/voi-150.json @@ -0,0 +1,218 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 6 + ], + [ + 2, + 6 + ], + [ + 3, + 5 + ], + [ + 5, + 5 + ] + ] + }, + { + "polygon": [ + [ + 4, + 4 + ], + [ + 7, + 4 + ], + [ + 7, + 5 + ], + [ + 4, + 5 + ] + ] + }, + { + "polygon": [ + [ + 7, + 3 + ], + [ + 7, + 5 + ], + [ + 6, + 5 + ], + [ + 6, + 4 + ], + [ + 4, + 4 + ], + [ + 4, + 3 + ] + ] + } + ], + "meta": { + "seed": 4203051, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.209836, + "contourComplexity": 40, + "connectedComponents": 1, + "fillRatio": 0.117676, + "difficultyScore": 0.425304, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 151, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-150/target.png", + "shapes": { + "S1": "../images/voi-150/shape_S1.png", + "S2": "../images/voi-150/shape_S2.png", + "S3": "../images/voi-150/shape_S3.png", + "S4": "../images/voi-150/shape_S4.png" + } + }, + "ID": "voi-150", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V1", + "grid": [ + 5, + 6 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V4", + "grid": [ + 4, + 5 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V6", + "grid": [ + 4, + 3 + ] + } + ] + }, + "legacy_answer": "S1 180 V1 [5,6]\nS2 0 V4 [4,5]\nS4 270 V6 [4,3]", + "solutionText": "S1 180 V1 [5,6]\nS2 0 V4 [4,5]\nS4 270 V6 [4,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-150\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-151.json b/voi/data/voi-151.json new file mode 100644 index 0000000000000000000000000000000000000000..c396e24e24c8d6f2e5201119ea6b9e65bb4a6ccb --- /dev/null +++ b/voi/data/voi-151.json @@ -0,0 +1,234 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 0 + ], + [ + 5, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 0 + ] + ] + }, + { + "polygon": [ + [ + 4, + 2 + ], + [ + 4, + 0 + ], + [ + 5, + 0 + ], + [ + 5, + 1 + ], + [ + 7, + 1 + ], + [ + 7, + 2 + ] + ] + }, + { + "polygon": [ + [ + 6, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 2 + ], + [ + 6, + 2 + ] + ] + } + ], + "meta": { + "seed": 4203052, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "contourComplexity": 14, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.530357, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 152, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-151/target.png", + "shapes": { + "S1": "../images/voi-151/shape_S1.png", + "S2": "../images/voi-151/shape_S2.png", + "S3": "../images/voi-151/shape_S3.png", + "S4": "../images/voi-151/shape_S4.png" + } + }, + "ID": "voi-151", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V1", + "grid": [ + 5, + 0 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V3", + "grid": [ + 5, + 0 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V3", + "grid": [ + 4, + 4 + ] + } + ] + }, + "legacy_answer": "S1 270 V1 [5,0]\nS2 90 V3 [5,0]\nS4 180 V3 [4,4]", + "solutionText": "S1 270 V1 [5,0]\nS2 90 V3 [5,0]\nS4 180 V3 [4,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-151\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-152.json b/voi/data/voi-152.json new file mode 100644 index 0000000000000000000000000000000000000000..86cca7db9a136436ca58ceaf146c8303943b9a82 --- /dev/null +++ b/voi/data/voi-152.json @@ -0,0 +1,194 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 4 + ], + [ + 6, + 1 + ], + [ + 8, + 1 + ], + [ + 8, + 4 + ] + ] + }, + { + "polygon": [ + [ + 5, + 0 + ], + [ + 7, + 0 + ], + [ + 7, + 2 + ], + [ + 5, + 2 + ] + ] + }, + { + "polygon": [ + [ + 7, + 3 + ], + [ + 5, + 3 + ], + [ + 7, + 1 + ] + ] + } + ], + "meta": { + "seed": 4203053, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.331606, + "contourComplexity": 78, + "connectedComponents": 1, + "fillRatio": 0.125977, + "difficultyScore": 0.774472, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 153, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-152/target.png", + "shapes": { + "S1": "../images/voi-152/shape_S1.png", + "S2": "../images/voi-152/shape_S2.png", + "S3": "../images/voi-152/shape_S3.png", + "S4": "../images/voi-152/shape_S4.png" + } + }, + "ID": "voi-152", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V3", + "grid": [ + 8, + 1 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V2", + "grid": [ + 7, + 0 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V2", + "grid": [ + 5, + 3 + ] + } + ] + }, + "legacy_answer": "S1 90 V3 [8,1]\nS3 0 V2 [7,0]\nS4 180 V2 [5,3]", + "solutionText": "S1 90 V3 [8,1]\nS3 0 V2 [7,0]\nS4 180 V2 [5,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-152\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-153.json b/voi/data/voi-153.json new file mode 100644 index 0000000000000000000000000000000000000000..c30fc90b7c6064eb46d61a5df1a7c06bd55eaaa2 --- /dev/null +++ b/voi/data/voi-153.json @@ -0,0 +1,202 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 0, + 5 + ], + [ + 1, + 5 + ], + [ + 1, + 7 + ], + [ + 0, + 7 + ] + ] + }, + { + "polygon": [ + [ + 2, + 5 + ], + [ + 2, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 5 + ] + ] + }, + { + "polygon": [ + [ + 1, + 4 + ], + [ + 4, + 4 + ], + [ + 4, + 6 + ], + [ + 1, + 6 + ] + ] + } + ], + "meta": { + "seed": 4203054, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "contourComplexity": 12, + "connectedComponents": 1, + "fillRatio": 0.109375, + "difficultyScore": 0.392361, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 154, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-153/target.png", + "shapes": { + "S1": "../images/voi-153/shape_S1.png", + "S2": "../images/voi-153/shape_S2.png", + "S3": "../images/voi-153/shape_S3.png", + "S4": "../images/voi-153/shape_S4.png" + } + }, + "ID": "voi-153", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V4", + "grid": [ + 0, + 7 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V1", + "grid": [ + 2, + 5 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V1", + "grid": [ + 1, + 4 + ] + } + ] + }, + "legacy_answer": "S1 0 V4 [0,7]\nS3 90 V1 [2,5]\nS4 0 V1 [1,4]", + "solutionText": "S1 0 V4 [0,7]\nS3 90 V1 [2,5]\nS4 0 V1 [1,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-153\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-154.json b/voi/data/voi-154.json new file mode 100644 index 0000000000000000000000000000000000000000..444c51cd707e9a7e527c1e82235a1ee6663d7ebf --- /dev/null +++ b/voi/data/voi-154.json @@ -0,0 +1,202 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 3 + ], + [ + 5, + 3 + ], + [ + 5, + 4 + ], + [ + 3, + 4 + ] + ] + }, + { + "polygon": [ + [ + 5, + 2 + ], + [ + 8, + 2 + ], + [ + 8, + 4 + ], + [ + 5, + 4 + ] + ] + }, + { + "polygon": [ + [ + 8, + 3 + ], + [ + 8, + 4 + ], + [ + 7, + 4 + ], + [ + 7, + 3 + ] + ] + } + ], + "meta": { + "seed": 4203055, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "contourComplexity": 8, + "connectedComponents": 1, + "fillRatio": 0.109375, + "difficultyScore": 0.392361, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 155, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-154/target.png", + "shapes": { + "S1": "../images/voi-154/shape_S1.png", + "S2": "../images/voi-154/shape_S2.png", + "S3": "../images/voi-154/shape_S3.png", + "S4": "../images/voi-154/shape_S4.png" + } + }, + "ID": "voi-154", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V1", + "grid": [ + 3, + 3 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V1", + "grid": [ + 5, + 2 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V4", + "grid": [ + 7, + 3 + ] + } + ] + }, + "legacy_answer": "S1 0 V1 [3,3]\nS2 0 V1 [5,2]\nS3 270 V4 [7,3]", + "solutionText": "S1 0 V1 [3,3]\nS2 0 V1 [5,2]\nS3 270 V4 [7,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-154\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-155.json b/voi/data/voi-155.json new file mode 100644 index 0000000000000000000000000000000000000000..b36f79f4ea59b4da924f418c6f07d60e9d25fc36 --- /dev/null +++ b/voi/data/voi-155.json @@ -0,0 +1,210 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 1, + 4 + ], + [ + 1, + 2 + ], + [ + 2, + 2 + ], + [ + 2, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 4 + ] + ] + }, + { + "polygon": [ + [ + 5, + 5 + ], + [ + 3, + 5 + ], + [ + 5, + 3 + ] + ] + }, + { + "polygon": [ + [ + 4, + 5 + ], + [ + 4, + 2 + ], + [ + 6, + 2 + ], + [ + 6, + 5 + ] + ] + } + ], + "meta": { + "seed": 4203056, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.253886, + "contourComplexity": 74, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.434294, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 156, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-155/target.png", + "shapes": { + "S1": "../images/voi-155/shape_S1.png", + "S2": "../images/voi-155/shape_S2.png", + "S3": "../images/voi-155/shape_S3.png", + "S4": "../images/voi-155/shape_S4.png" + } + }, + "ID": "voi-155", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V5", + "grid": [ + 4, + 3 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V1", + "grid": [ + 5, + 5 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V4", + "grid": [ + 6, + 5 + ] + } + ] + }, + "legacy_answer": "S1 90 V5 [4,3]\nS2 180 V1 [5,5]\nS3 90 V4 [6,5]", + "solutionText": "S1 90 V5 [4,3]\nS2 180 V1 [5,5]\nS3 90 V4 [6,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-155\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-156.json b/voi/data/voi-156.json new file mode 100644 index 0000000000000000000000000000000000000000..85c1012a56f7e2dbb9e92413d4ff8d953de6f98e --- /dev/null +++ b/voi/data/voi-156.json @@ -0,0 +1,218 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 5 + ], + [ + 4, + 7 + ], + [ + 3, + 7 + ], + [ + 3, + 6 + ], + [ + 1, + 6 + ], + [ + 1, + 5 + ] + ] + }, + { + "polygon": [ + [ + 4, + 6 + ], + [ + 4, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 6 + ] + ] + }, + { + "polygon": [ + [ + 3, + 3 + ], + [ + 6, + 3 + ], + [ + 6, + 5 + ], + [ + 3, + 5 + ] + ] + } + ], + "meta": { + "seed": 4203057, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.166667, + "contourComplexity": 16, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.520833, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 157, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-156/target.png", + "shapes": { + "S1": "../images/voi-156/shape_S1.png", + "S2": "../images/voi-156/shape_S2.png", + "S3": "../images/voi-156/shape_S3.png", + "S4": "../images/voi-156/shape_S4.png" + } + }, + "ID": "voi-156", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V5", + "grid": [ + 1, + 6 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V3", + "grid": [ + 5, + 4 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V1", + "grid": [ + 3, + 3 + ] + } + ] + }, + "legacy_answer": "S1 270 V5 [1,6]\nS3 90 V3 [5,4]\nS4 0 V1 [3,3]", + "solutionText": "S1 270 V5 [1,6]\nS3 90 V3 [5,4]\nS4 0 V1 [3,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-156\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-157.json b/voi/data/voi-157.json new file mode 100644 index 0000000000000000000000000000000000000000..12b359cc5f902f76fad5b286f6714cf6907646c6 --- /dev/null +++ b/voi/data/voi-157.json @@ -0,0 +1,202 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 3 + ], + [ + 1, + 3 + ], + [ + 1, + 1 + ], + [ + 2, + 1 + ] + ] + }, + { + "polygon": [ + [ + 5, + 2 + ], + [ + 2, + 2 + ], + [ + 2, + 0 + ], + [ + 5, + 0 + ] + ] + }, + { + "polygon": [ + [ + 3, + 1 + ], + [ + 0, + 1 + ], + [ + 0, + 0 + ], + [ + 3, + 0 + ] + ] + } + ], + "meta": { + "seed": 4203058, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "contourComplexity": 12, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.491477, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 158, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-157/target.png", + "shapes": { + "S1": "../images/voi-157/shape_S1.png", + "S2": "../images/voi-157/shape_S2.png", + "S3": "../images/voi-157/shape_S3.png", + "S4": "../images/voi-157/shape_S4.png" + } + }, + "ID": "voi-157", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V4", + "grid": [ + 2, + 1 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V4", + "grid": [ + 5, + 0 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V1", + "grid": [ + 3, + 1 + ] + } + ] + }, + "legacy_answer": "S1 180 V4 [2,1]\nS2 180 V4 [5,0]\nS4 180 V1 [3,1]", + "solutionText": "S1 180 V4 [2,1]\nS2 180 V4 [5,0]\nS4 180 V1 [3,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-157\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-158.json b/voi/data/voi-158.json new file mode 100644 index 0000000000000000000000000000000000000000..854ad8bbadf1a69bc7a9f4afcd49b8566c388de2 --- /dev/null +++ b/voi/data/voi-158.json @@ -0,0 +1,210 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 7, + 6 + ], + [ + 5, + 6 + ], + [ + 5, + 5 + ], + [ + 6, + 5 + ], + [ + 6, + 3 + ], + [ + 7, + 3 + ] + ] + }, + { + "polygon": [ + [ + 7, + 7 + ], + [ + 5, + 7 + ], + [ + 7, + 5 + ] + ] + }, + { + "polygon": [ + [ + 7, + 0 + ], + [ + 7, + 3 + ], + [ + 6, + 3 + ], + [ + 6, + 0 + ] + ] + } + ], + "meta": { + "seed": 4203059, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.117241, + "contourComplexity": 72, + "connectedComponents": 1, + "fillRatio": 0.125, + "difficultyScore": 0.781034, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 159, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-158/target.png", + "shapes": { + "S1": "../images/voi-158/shape_S1.png", + "S2": "../images/voi-158/shape_S2.png", + "S3": "../images/voi-158/shape_S3.png", + "S4": "../images/voi-158/shape_S4.png" + } + }, + "ID": "voi-158", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 180, + "vertex": "V3", + "grid": [ + 5, + 5 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V2", + "grid": [ + 5, + 7 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V2", + "grid": [ + 7, + 3 + ] + } + ] + }, + "legacy_answer": "S2 180 V3 [5,5]\nS3 180 V2 [5,7]\nS4 270 V2 [7,3]", + "solutionText": "S2 180 V3 [5,5]\nS3 180 V2 [5,7]\nS4 270 V2 [7,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-158\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-159.json b/voi/data/voi-159.json new file mode 100644 index 0000000000000000000000000000000000000000..2c0e6c2c939fa21c154e6d3adb066300cb398051 --- /dev/null +++ b/voi/data/voi-159.json @@ -0,0 +1,198 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 4 + ], + [ + 2, + 4 + ], + [ + 2, + 2 + ], + [ + 4, + 2 + ] + ] + }, + { + "polygon": [ + [ + 0, + 3 + ], + [ + 2, + 3 + ], + [ + 2, + 5 + ], + [ + 0, + 5 + ] + ] + }, + { + "polygon": [ + [ + 3, + 4 + ], + [ + 3, + 6 + ], + [ + 1, + 6 + ], + [ + 1, + 4 + ] + ] + } + ], + "meta": { + "seed": 4203060, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.166667, + "contourComplexity": 15, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.520833, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 160, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-159/target.png", + "shapes": { + "S1": "../images/voi-159/shape_S1.png", + "S2": "../images/voi-159/shape_S2.png", + "S3": "../images/voi-159/shape_S3.png", + "S4": "../images/voi-159/shape_S4.png" + } + }, + "ID": "voi-159", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V1", + "grid": [ + 4, + 4 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V2", + "grid": [ + 2, + 3 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V2", + "grid": [ + 3, + 6 + ] + } + ] + }, + "legacy_answer": "S1 180 V1 [4,4]\nS2 0 V2 [2,3]\nS4 270 V2 [3,6]", + "solutionText": "S1 180 V1 [4,4]\nS2 0 V2 [2,3]\nS4 270 V2 [3,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-159\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-160.json b/voi/data/voi-160.json new file mode 100644 index 0000000000000000000000000000000000000000..6c7f8a8a566d3fbc28aee9ed0f64d5ebe6ca48ab --- /dev/null +++ b/voi/data/voi-160.json @@ -0,0 +1,202 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 5 + ], + [ + 6, + 5 + ], + [ + 6, + 7 + ], + [ + 5, + 7 + ] + ] + }, + { + "polygon": [ + [ + 3, + 3 + ], + [ + 3, + 6 + ], + [ + 1, + 6 + ], + [ + 1, + 3 + ] + ] + }, + { + "polygon": [ + [ + 3, + 5 + ], + [ + 6, + 5 + ], + [ + 6, + 7 + ], + [ + 3, + 7 + ] + ] + } + ], + "meta": { + "seed": 4203061, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "contourComplexity": 8, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.530357, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 161, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-160/target.png", + "shapes": { + "S1": "../images/voi-160/shape_S1.png", + "S2": "../images/voi-160/shape_S2.png", + "S3": "../images/voi-160/shape_S3.png", + "S4": "../images/voi-160/shape_S4.png" + } + }, + "ID": "voi-160", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 0, + "vertex": "V2", + "grid": [ + 6, + 5 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V3", + "grid": [ + 1, + 6 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V3", + "grid": [ + 6, + 7 + ] + } + ] + }, + "legacy_answer": "S2 0 V2 [6,5]\nS3 270 V3 [1,6]\nS4 0 V3 [6,7]", + "solutionText": "S2 0 V2 [6,5]\nS3 270 V3 [1,6]\nS4 0 V3 [6,7]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-160\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-161.json b/voi/data/voi-161.json new file mode 100644 index 0000000000000000000000000000000000000000..ad2424556f14d3887ffd3569b6cb0740848e5781 --- /dev/null +++ b/voi/data/voi-161.json @@ -0,0 +1,210 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 1, + 2 + ], + [ + 1, + 1 + ], + [ + 2, + 2 + ] + ] + }, + { + "polygon": [ + [ + 4, + 1 + ], + [ + 4, + 2 + ], + [ + 1, + 2 + ], + [ + 1, + 1 + ] + ] + }, + { + "polygon": [ + [ + 4, + 0 + ], + [ + 6, + 0 + ], + [ + 6, + 1 + ], + [ + 5, + 1 + ], + [ + 5, + 3 + ], + [ + 4, + 3 + ] + ] + } + ], + "meta": { + "seed": 4203062, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.141079, + "contourComplexity": 40, + "connectedComponents": 1, + "fillRatio": 0.101074, + "difficultyScore": 0.733536, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 162, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-161/target.png", + "shapes": { + "S1": "../images/voi-161/shape_S1.png", + "S2": "../images/voi-161/shape_S2.png", + "S3": "../images/voi-161/shape_S3.png", + "S4": "../images/voi-161/shape_S4.png" + } + }, + "ID": "voi-161", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V1", + "grid": [ + 1, + 2 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V4", + "grid": [ + 1, + 1 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V3", + "grid": [ + 6, + 1 + ] + } + ] + }, + "legacy_answer": "S1 90 V1 [1,2]\nS2 270 V4 [1,1]\nS3 0 V3 [6,1]", + "solutionText": "S1 90 V1 [1,2]\nS2 270 V4 [1,1]\nS3 0 V3 [6,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-161\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[0,1]\n- S2: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-162.json b/voi/data/voi-162.json new file mode 100644 index 0000000000000000000000000000000000000000..3aa5309bf50dabd4131efad058031546f00887a5 --- /dev/null +++ b/voi/data/voi-162.json @@ -0,0 +1,218 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 5 + ], + [ + 5, + 5 + ], + [ + 5, + 6 + ], + [ + 2, + 6 + ] + ] + }, + { + "polygon": [ + [ + 2, + 7 + ], + [ + 5, + 7 + ], + [ + 5, + 8 + ], + [ + 2, + 8 + ] + ] + }, + { + "polygon": [ + [ + 2, + 7 + ], + [ + 2, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 6 + ], + [ + 5, + 6 + ], + [ + 5, + 7 + ] + ] + } + ], + "meta": { + "seed": 4203063, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "contourComplexity": 6, + "connectedComponents": 1, + "fillRatio": 0.125, + "difficultyScore": 0.45, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 163, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-162/target.png", + "shapes": { + "S1": "../images/voi-162/shape_S1.png", + "S2": "../images/voi-162/shape_S2.png", + "S3": "../images/voi-162/shape_S3.png", + "S4": "../images/voi-162/shape_S4.png" + } + }, + "ID": "voi-162", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V4", + "grid": [ + 2, + 6 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V1", + "grid": [ + 2, + 7 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V4", + "grid": [ + 3, + 6 + ] + } + ] + }, + "legacy_answer": "S1 0 V4 [2,6]\nS2 0 V1 [2,7]\nS4 90 V4 [3,6]", + "solutionText": "S1 0 V4 [2,6]\nS2 0 V1 [2,7]\nS4 90 V4 [3,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-162\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S3: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-163.json b/voi/data/voi-163.json new file mode 100644 index 0000000000000000000000000000000000000000..21dd11e6997edc96dd63965fed80ea6825dd12e4 --- /dev/null +++ b/voi/data/voi-163.json @@ -0,0 +1,206 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 1, + 5 + ], + [ + 1, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 5 + ] + ] + }, + { + "polygon": [ + [ + 4, + 2 + ], + [ + 4, + 3 + ], + [ + 3, + 2 + ] + ] + }, + { + "polygon": [ + [ + 3, + 4 + ], + [ + 3, + 2 + ], + [ + 4, + 2 + ], + [ + 4, + 3 + ], + [ + 6, + 3 + ], + [ + 6, + 4 + ] + ] + } + ], + "meta": { + "seed": 4203064, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.124542, + "contourComplexity": 38, + "connectedComponents": 1, + "fillRatio": 0.116699, + "difficultyScore": 0.768433, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 164, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-163/target.png", + "shapes": { + "S1": "../images/voi-163/shape_S1.png", + "S2": "../images/voi-163/shape_S2.png", + "S3": "../images/voi-163/shape_S3.png", + "S4": "../images/voi-163/shape_S4.png" + } + }, + "ID": "voi-163", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V3", + "grid": [ + 3, + 3 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V3", + "grid": [ + 3, + 2 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V3", + "grid": [ + 4, + 2 + ] + } + ] + }, + "legacy_answer": "S1 90 V3 [3,3]\nS2 270 V3 [3,2]\nS3 90 V3 [4,2]", + "solutionText": "S1 90 V3 [3,3]\nS2 270 V3 [3,2]\nS3 90 V3 [4,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-163\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[1,0], V3=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-164.json b/voi/data/voi-164.json new file mode 100644 index 0000000000000000000000000000000000000000..029a596302872767468e279e41b9b52641a61f10 --- /dev/null +++ b/voi/data/voi-164.json @@ -0,0 +1,210 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 2 + ], + [ + 4, + 4 + ], + [ + 2, + 2 + ] + ] + }, + { + "polygon": [ + [ + 4, + 3 + ], + [ + 4, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 4 + ], + [ + 1, + 4 + ], + [ + 1, + 3 + ] + ] + }, + { + "polygon": [ + [ + 4, + 1 + ], + [ + 4, + 2 + ], + [ + 1, + 2 + ], + [ + 1, + 1 + ] + ] + } + ], + "meta": { + "seed": 4203065, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.117241, + "contourComplexity": 74, + "connectedComponents": 1, + "fillRatio": 0.125, + "difficultyScore": 0.781034, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 165, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-164/target.png", + "shapes": { + "S1": "../images/voi-164/shape_S1.png", + "S2": "../images/voi-164/shape_S2.png", + "S3": "../images/voi-164/shape_S3.png", + "S4": "../images/voi-164/shape_S4.png" + } + }, + "ID": "voi-164", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V3", + "grid": [ + 2, + 2 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V5", + "grid": [ + 1, + 4 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V2", + "grid": [ + 4, + 2 + ] + } + ] + }, + "legacy_answer": "S1 270 V3 [2,2]\nS2 270 V5 [1,4]\nS3 270 V2 [4,2]", + "solutionText": "S1 270 V3 [2,2]\nS2 270 V5 [1,4]\nS3 270 V2 [4,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-164\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S4: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-165.json b/voi/data/voi-165.json new file mode 100644 index 0000000000000000000000000000000000000000..437a6216e3e92ddbbbf3a0671072cc178a6b135e --- /dev/null +++ b/voi/data/voi-165.json @@ -0,0 +1,218 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 7, + 3 + ], + [ + 5, + 3 + ], + [ + 5, + 2 + ], + [ + 6, + 2 + ], + [ + 6, + 0 + ], + [ + 7, + 0 + ] + ] + }, + { + "polygon": [ + [ + 5, + 0 + ], + [ + 5, + 1 + ], + [ + 2, + 1 + ], + [ + 2, + 0 + ] + ] + }, + { + "polygon": [ + [ + 6, + 0 + ], + [ + 6, + 3 + ], + [ + 5, + 3 + ], + [ + 5, + 0 + ] + ] + } + ], + "meta": { + "seed": 4203067, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "contourComplexity": 8, + "connectedComponents": 1, + "fillRatio": 0.125, + "difficultyScore": 0.45, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 166, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-165/target.png", + "shapes": { + "S1": "../images/voi-165/shape_S1.png", + "S2": "../images/voi-165/shape_S2.png", + "S3": "../images/voi-165/shape_S3.png", + "S4": "../images/voi-165/shape_S4.png" + } + }, + "ID": "voi-165", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 180, + "vertex": "V1", + "grid": [ + 7, + 3 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V4", + "grid": [ + 2, + 0 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V1", + "grid": [ + 6, + 0 + ] + } + ] + }, + "legacy_answer": "S2 180 V1 [7,3]\nS3 270 V4 [2,0]\nS4 270 V1 [6,0]", + "solutionText": "S2 180 V1 [7,3]\nS3 270 V4 [2,0]\nS4 270 V1 [6,0]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-165\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S4: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-166.json b/voi/data/voi-166.json new file mode 100644 index 0000000000000000000000000000000000000000..622adfe0a1182da5f1278b1e06decc3486c05e29 --- /dev/null +++ b/voi/data/voi-166.json @@ -0,0 +1,218 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 0 + ], + [ + 6, + 0 + ], + [ + 6, + 2 + ], + [ + 3, + 2 + ] + ] + }, + { + "polygon": [ + [ + 2, + 3 + ], + [ + 2, + 2 + ], + [ + 5, + 2 + ], + [ + 5, + 3 + ] + ] + }, + { + "polygon": [ + [ + 5, + 3 + ], + [ + 5, + 1 + ], + [ + 6, + 1 + ], + [ + 6, + 2 + ], + [ + 8, + 2 + ], + [ + 8, + 3 + ] + ] + } + ], + "meta": { + "seed": 4203068, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.153846, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.171875, + "difficultyScore": 0.540865, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 167, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-166/target.png", + "shapes": { + "S1": "../images/voi-166/shape_S1.png", + "S2": "../images/voi-166/shape_S2.png", + "S3": "../images/voi-166/shape_S3.png", + "S4": "../images/voi-166/shape_S4.png" + } + }, + "ID": "voi-166", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V3", + "grid": [ + 6, + 2 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V1", + "grid": [ + 2, + 3 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V6", + "grid": [ + 8, + 3 + ] + } + ] + }, + "legacy_answer": "S1 0 V3 [6,2]\nS2 90 V1 [2,3]\nS4 90 V6 [8,3]", + "solutionText": "S1 0 V3 [6,2]\nS2 90 V1 [2,3]\nS4 90 V6 [8,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-166\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S3: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-167.json b/voi/data/voi-167.json new file mode 100644 index 0000000000000000000000000000000000000000..83307021fb1bcc2ecd05fc1a92e18d614b3c24ab --- /dev/null +++ b/voi/data/voi-167.json @@ -0,0 +1,202 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 7 + ], + [ + 3, + 7 + ], + [ + 3, + 5 + ], + [ + 6, + 5 + ] + ] + }, + { + "polygon": [ + [ + 6, + 6 + ], + [ + 6, + 3 + ], + [ + 7, + 4 + ], + [ + 7, + 6 + ] + ] + }, + { + "polygon": [ + [ + 8, + 6 + ], + [ + 8, + 7 + ], + [ + 5, + 7 + ], + [ + 5, + 6 + ] + ] + } + ], + "meta": { + "seed": 4203069, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.173442, + "contourComplexity": 42, + "connectedComponents": 1, + "fillRatio": 0.148926, + "difficultyScore": 0.508381, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 168, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-167/target.png", + "shapes": { + "S1": "../images/voi-167/shape_S1.png", + "S2": "../images/voi-167/shape_S2.png", + "S3": "../images/voi-167/shape_S3.png", + "S4": "../images/voi-167/shape_S4.png" + } + }, + "ID": "voi-167", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V1", + "grid": [ + 6, + 7 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V4", + "grid": [ + 7, + 6 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V1", + "grid": [ + 8, + 6 + ] + } + ] + }, + "legacy_answer": "S1 180 V1 [6,7]\nS3 90 V4 [7,6]\nS4 270 V1 [8,6]", + "solutionText": "S1 180 V1 [6,7]\nS3 90 V4 [7,6]\nS4 270 V1 [8,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-167\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S3: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-168.json b/voi/data/voi-168.json new file mode 100644 index 0000000000000000000000000000000000000000..188cde0d7fe62915a3db24b190398b712200f561 --- /dev/null +++ b/voi/data/voi-168.json @@ -0,0 +1,190 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 1, + 6 + ], + [ + 1, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 6 + ] + ] + }, + { + "polygon": [ + [ + 2, + 7 + ], + [ + 2, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 7 + ] + ] + }, + { + "polygon": [ + [ + 4, + 4 + ], + [ + 4, + 5 + ], + [ + 3, + 4 + ] + ] + } + ], + "meta": { + "seed": 4203070, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.189911, + "contourComplexity": 44, + "connectedComponents": 1, + "fillRatio": 0.133301, + "difficultyScore": 0.473755, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 169, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-168/target.png", + "shapes": { + "S1": "../images/voi-168/shape_S1.png", + "S2": "../images/voi-168/shape_S2.png", + "S3": "../images/voi-168/shape_S3.png", + "S4": "../images/voi-168/shape_S4.png" + } + }, + "ID": "voi-168", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 90, + "vertex": "V3", + "grid": [ + 3, + 3 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V2", + "grid": [ + 2, + 5 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V2", + "grid": [ + 4, + 5 + ] + } + ] + }, + "legacy_answer": "S2 90 V3 [3,3]\nS3 90 V2 [2,5]\nS4 270 V2 [4,5]", + "solutionText": "S2 90 V3 [3,3]\nS3 90 V2 [2,5]\nS4 270 V2 [4,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-168\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-169.json b/voi/data/voi-169.json new file mode 100644 index 0000000000000000000000000000000000000000..f86f70bd03391f3f6f911f2f33644d5741ecdb21 --- /dev/null +++ b/voi/data/voi-169.json @@ -0,0 +1,218 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 2 + ], + [ + 5, + 2 + ] + ] + }, + { + "polygon": [ + [ + 0, + 3 + ], + [ + 0, + 1 + ], + [ + 1, + 1 + ], + [ + 1, + 2 + ], + [ + 3, + 2 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 2, + 5 + ], + [ + 2, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 5 + ] + ] + } + ], + "meta": { + "seed": 4203071, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.166667, + "contourComplexity": 14, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.520833, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 170, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-169/target.png", + "shapes": { + "S1": "../images/voi-169/shape_S1.png", + "S2": "../images/voi-169/shape_S2.png", + "S3": "../images/voi-169/shape_S3.png", + "S4": "../images/voi-169/shape_S4.png" + } + }, + "ID": "voi-169", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V3", + "grid": [ + 3, + 2 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V1", + "grid": [ + 0, + 3 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V1", + "grid": [ + 2, + 5 + ] + } + ] + }, + "legacy_answer": "S1 180 V3 [3,2]\nS3 90 V1 [0,3]\nS4 90 V1 [2,5]", + "solutionText": "S1 180 V3 [3,2]\nS3 90 V1 [0,3]\nS4 90 V1 [2,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-169\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-170.json b/voi/data/voi-170.json new file mode 100644 index 0000000000000000000000000000000000000000..c02266d28453d9dd1dca1f7bd72e22d59aeb96ff --- /dev/null +++ b/voi/data/voi-170.json @@ -0,0 +1,190 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 3 + ], + [ + 3, + 4 + ], + [ + 2, + 4 + ], + [ + 2, + 3 + ] + ] + }, + { + "polygon": [ + [ + 3, + 0 + ], + [ + 5, + 0 + ], + [ + 3, + 2 + ] + ] + }, + { + "polygon": [ + [ + 2, + 5 + ], + [ + 2, + 2 + ], + [ + 4, + 2 + ], + [ + 4, + 5 + ] + ] + } + ], + "meta": { + "seed": 4203072, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.22069, + "contourComplexity": 74, + "connectedComponents": 1, + "fillRatio": 0.110352, + "difficultyScore": 0.396538, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 171, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-170/target.png", + "shapes": { + "S1": "../images/voi-170/shape_S1.png", + "S2": "../images/voi-170/shape_S2.png", + "S3": "../images/voi-170/shape_S3.png", + "S4": "../images/voi-170/shape_S4.png" + } + }, + "ID": "voi-170", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 270, + "vertex": "V3", + "grid": [ + 2, + 4 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V2", + "grid": [ + 5, + 0 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V2", + "grid": [ + 2, + 2 + ] + } + ] + }, + "legacy_answer": "S2 270 V3 [2,4]\nS3 0 V2 [5,0]\nS4 90 V2 [2,2]", + "solutionText": "S2 270 V3 [2,4]\nS3 0 V2 [5,0]\nS4 90 V2 [2,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-170\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[0,1]\n- S2: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-171.json b/voi/data/voi-171.json new file mode 100644 index 0000000000000000000000000000000000000000..372d2bf0a36d568feb3782d92f4120048356d893 --- /dev/null +++ b/voi/data/voi-171.json @@ -0,0 +1,194 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 4 + ], + [ + 6, + 4 + ], + [ + 6, + 6 + ], + [ + 4, + 6 + ] + ] + }, + { + "polygon": [ + [ + 4, + 7 + ], + [ + 4, + 6 + ], + [ + 5, + 7 + ] + ] + }, + { + "polygon": [ + [ + 4, + 8 + ], + [ + 4, + 6 + ], + [ + 6, + 6 + ], + [ + 6, + 8 + ] + ] + } + ], + "meta": { + "seed": 4203073, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.124542, + "contourComplexity": 38, + "connectedComponents": 1, + "fillRatio": 0.116699, + "difficultyScore": 0.768433, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 172, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-171/target.png", + "shapes": { + "S1": "../images/voi-171/shape_S1.png", + "S2": "../images/voi-171/shape_S2.png", + "S3": "../images/voi-171/shape_S3.png", + "S4": "../images/voi-171/shape_S4.png" + } + }, + "ID": "voi-171", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V3", + "grid": [ + 6, + 6 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V3", + "grid": [ + 5, + 7 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V4", + "grid": [ + 6, + 8 + ] + } + ] + }, + "legacy_answer": "S1 0 V3 [6,6]\nS2 90 V3 [5,7]\nS4 90 V4 [6,8]", + "solutionText": "S1 0 V3 [6,6]\nS2 90 V3 [5,7]\nS4 90 V4 [6,8]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-171\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[0,1]\n- S3: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-172.json b/voi/data/voi-172.json new file mode 100644 index 0000000000000000000000000000000000000000..04ae9a4d4ca8850baeeb0140e622dffbb660a1ad --- /dev/null +++ b/voi/data/voi-172.json @@ -0,0 +1,218 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 4 + ], + [ + 5, + 6 + ], + [ + 4, + 6 + ], + [ + 4, + 5 + ], + [ + 2, + 5 + ], + [ + 2, + 4 + ] + ] + }, + { + "polygon": [ + [ + 4, + 3 + ], + [ + 4, + 6 + ], + [ + 2, + 6 + ], + [ + 2, + 3 + ] + ] + }, + { + "polygon": [ + [ + 0, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 5 + ], + [ + 0, + 5 + ] + ] + } + ], + "meta": { + "seed": 4203074, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.307692, + "contourComplexity": 14, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.649519, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 173, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-172/target.png", + "shapes": { + "S1": "../images/voi-172/shape_S1.png", + "S2": "../images/voi-172/shape_S2.png", + "S3": "../images/voi-172/shape_S3.png", + "S4": "../images/voi-172/shape_S4.png" + } + }, + "ID": "voi-172", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V6", + "grid": [ + 2, + 4 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V3", + "grid": [ + 2, + 6 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V2", + "grid": [ + 3, + 4 + ] + } + ] + }, + "legacy_answer": "S1 270 V6 [2,4]\nS2 270 V3 [2,6]\nS3 0 V2 [3,4]", + "solutionText": "S1 270 V6 [2,4]\nS2 270 V3 [2,6]\nS3 0 V2 [3,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-172\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S4: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-173.json b/voi/data/voi-173.json new file mode 100644 index 0000000000000000000000000000000000000000..067472e3fa0a3bbf5621594090d1bb8a1f5bc8d8 --- /dev/null +++ b/voi/data/voi-173.json @@ -0,0 +1,210 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 6 + ], + [ + 2, + 4 + ], + [ + 4, + 6 + ] + ] + }, + { + "polygon": [ + [ + 2, + 5 + ], + [ + 2, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 5 + ] + ] + }, + { + "polygon": [ + [ + 2, + 7 + ], + [ + 2, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 6 + ], + [ + 5, + 6 + ], + [ + 5, + 7 + ] + ] + } + ], + "meta": { + "seed": 4203075, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.304348, + "contourComplexity": 72, + "connectedComponents": 1, + "fillRatio": 0.109375, + "difficultyScore": 0.698641, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 174, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-173/target.png", + "shapes": { + "S1": "../images/voi-173/shape_S1.png", + "S2": "../images/voi-173/shape_S2.png", + "S3": "../images/voi-173/shape_S3.png", + "S4": "../images/voi-173/shape_S4.png" + } + }, + "ID": "voi-173", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V3", + "grid": [ + 4, + 6 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V2", + "grid": [ + 2, + 3 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V2", + "grid": [ + 2, + 5 + ] + } + ] + }, + "legacy_answer": "S1 90 V3 [4,6]\nS3 90 V2 [2,3]\nS4 90 V2 [2,5]", + "solutionText": "S1 90 V3 [4,6]\nS3 90 V2 [2,3]\nS4 90 V2 [2,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-173\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-174.json b/voi/data/voi-174.json new file mode 100644 index 0000000000000000000000000000000000000000..a50fdc1edf0544d70fe97088887995639a17de1b --- /dev/null +++ b/voi/data/voi-174.json @@ -0,0 +1,214 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 2 + ], + [ + 5, + 2 + ], + [ + 5, + 3 + ], + [ + 2, + 3 + ] + ] + }, + { + "polygon": [ + [ + 4, + 6 + ], + [ + 2, + 6 + ], + [ + 2, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 3 + ], + [ + 4, + 3 + ] + ] + }, + { + "polygon": [ + [ + 3, + 3 + ], + [ + 3, + 6 + ], + [ + 1, + 6 + ], + [ + 1, + 3 + ] + ] + } + ], + "meta": { + "seed": 4203076, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.153846, + "contourComplexity": 12, + "connectedComponents": 1, + "fillRatio": 0.171875, + "difficultyScore": 0.540865, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 175, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-174/target.png", + "shapes": { + "S1": "../images/voi-174/shape_S1.png", + "S2": "../images/voi-174/shape_S2.png", + "S3": "../images/voi-174/shape_S3.png", + "S4": "../images/voi-174/shape_S4.png" + } + }, + "ID": "voi-174", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 0, + "vertex": "V2", + "grid": [ + 5, + 2 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V1", + "grid": [ + 4, + 6 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V1", + "grid": [ + 3, + 3 + ] + } + ] + }, + "legacy_answer": "S2 0 V2 [5,2]\nS3 180 V1 [4,6]\nS4 270 V1 [3,3]", + "solutionText": "S2 0 V2 [5,2]\nS3 180 V1 [4,6]\nS4 270 V1 [3,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-174\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-175.json b/voi/data/voi-175.json new file mode 100644 index 0000000000000000000000000000000000000000..a9d18d138c2a3f04dfdcd59e0b987fcda27c4117 --- /dev/null +++ b/voi/data/voi-175.json @@ -0,0 +1,186 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 3 + ], + [ + 6, + 3 + ], + [ + 4, + 5 + ] + ] + }, + { + "polygon": [ + [ + 2, + 4 + ], + [ + 4, + 4 + ], + [ + 4, + 6 + ], + [ + 2, + 6 + ] + ] + }, + { + "polygon": [ + [ + 4, + 3 + ], + [ + 4, + 5 + ], + [ + 2, + 3 + ] + ] + } + ], + "meta": { + "seed": 4203077, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.130769, + "contourComplexity": 134, + "connectedComponents": 1, + "fillRatio": 0.110352, + "difficultyScore": 0.75622, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 176, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-175/target.png", + "shapes": { + "S1": "../images/voi-175/shape_S1.png", + "S2": "../images/voi-175/shape_S2.png", + "S3": "../images/voi-175/shape_S3.png", + "S4": "../images/voi-175/shape_S4.png" + } + }, + "ID": "voi-175", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 0, + "vertex": "V2", + "grid": [ + 6, + 3 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V4", + "grid": [ + 2, + 6 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V2", + "grid": [ + 4, + 5 + ] + } + ] + }, + "legacy_answer": "S2 0 V2 [6,3]\nS3 0 V4 [2,6]\nS4 270 V2 [4,5]", + "solutionText": "S2 0 V2 [6,3]\nS3 0 V4 [2,6]\nS4 270 V2 [4,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-175\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-176.json b/voi/data/voi-176.json new file mode 100644 index 0000000000000000000000000000000000000000..b604748776f7431e188d6652fba7166140287e27 --- /dev/null +++ b/voi/data/voi-176.json @@ -0,0 +1,190 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 6 + ], + [ + 5, + 5 + ], + [ + 6, + 5 + ], + [ + 6, + 6 + ] + ] + }, + { + "polygon": [ + [ + 4, + 6 + ], + [ + 4, + 3 + ], + [ + 6, + 3 + ], + [ + 6, + 6 + ] + ] + }, + { + "polygon": [ + [ + 4, + 4 + ], + [ + 2, + 4 + ], + [ + 4, + 2 + ] + ] + } + ], + "meta": { + "seed": 4203078, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.22069, + "contourComplexity": 72, + "connectedComponents": 1, + "fillRatio": 0.110352, + "difficultyScore": 0.396538, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 177, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-176/target.png", + "shapes": { + "S1": "../images/voi-176/shape_S1.png", + "S2": "../images/voi-176/shape_S2.png", + "S3": "../images/voi-176/shape_S3.png", + "S4": "../images/voi-176/shape_S4.png" + } + }, + "ID": "voi-176", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V1", + "grid": [ + 5, + 6 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V4", + "grid": [ + 6, + 6 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V3", + "grid": [ + 4, + 2 + ] + } + ] + }, + "legacy_answer": "S1 90 V1 [5,6]\nS2 90 V4 [6,6]\nS3 180 V3 [4,2]", + "solutionText": "S1 90 V1 [5,6]\nS2 90 V4 [6,6]\nS3 180 V3 [4,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-176\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-177.json b/voi/data/voi-177.json new file mode 100644 index 0000000000000000000000000000000000000000..b92baf1016cca3eda3c907dbb8d752da171d4051 --- /dev/null +++ b/voi/data/voi-177.json @@ -0,0 +1,214 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 1, + 4 + ], + [ + 1, + 2 + ], + [ + 3, + 2 + ], + [ + 3, + 4 + ] + ] + }, + { + "polygon": [ + [ + 5, + 2 + ], + [ + 2, + 2 + ], + [ + 3, + 1 + ], + [ + 5, + 1 + ] + ] + }, + { + "polygon": [ + [ + 5, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 1 + ], + [ + 5, + 1 + ] + ] + } + ], + "meta": { + "seed": 4203079, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.189911, + "contourComplexity": 42, + "connectedComponents": 1, + "fillRatio": 0.133301, + "difficultyScore": 0.473755, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 178, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-177/target.png", + "shapes": { + "S1": "../images/voi-177/shape_S1.png", + "S2": "../images/voi-177/shape_S2.png", + "S3": "../images/voi-177/shape_S3.png", + "S4": "../images/voi-177/shape_S4.png" + } + }, + "ID": "voi-177", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 90, + "vertex": "V4", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V4", + "grid": [ + 5, + 1 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V4", + "grid": [ + 4, + 3 + ] + } + ] + }, + "legacy_answer": "S2 90 V4 [3,4]\nS3 180 V4 [5,1]\nS4 180 V4 [4,3]", + "solutionText": "S2 90 V4 [3,4]\nS3 180 V4 [5,1]\nS4 180 V4 [4,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-177\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-178.json b/voi/data/voi-178.json new file mode 100644 index 0000000000000000000000000000000000000000..b2789264b51685c5c34e6cb99b757d11feb543f9 --- /dev/null +++ b/voi/data/voi-178.json @@ -0,0 +1,218 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 3 + ], + [ + 4, + 0 + ], + [ + 5, + 0 + ], + [ + 5, + 3 + ] + ] + }, + { + "polygon": [ + [ + 2, + 0 + ], + [ + 4, + 0 + ], + [ + 4, + 1 + ], + [ + 3, + 1 + ], + [ + 3, + 3 + ], + [ + 2, + 3 + ] + ] + }, + { + "polygon": [ + [ + 3, + 3 + ], + [ + 3, + 0 + ], + [ + 4, + 0 + ], + [ + 4, + 3 + ] + ] + } + ], + "meta": { + "seed": 4203080, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "contourComplexity": 8, + "connectedComponents": 1, + "fillRatio": 0.125, + "difficultyScore": 0.45, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 179, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-178/target.png", + "shapes": { + "S1": "../images/voi-178/shape_S1.png", + "S2": "../images/voi-178/shape_S2.png", + "S3": "../images/voi-178/shape_S3.png", + "S4": "../images/voi-178/shape_S4.png" + } + }, + "ID": "voi-178", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 90, + "vertex": "V2", + "grid": [ + 4, + 0 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V5", + "grid": [ + 3, + 3 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V3", + "grid": [ + 4, + 0 + ] + } + ] + }, + "legacy_answer": "S2 90 V2 [4,0]\nS3 0 V5 [3,3]\nS4 90 V3 [4,0]", + "solutionText": "S2 90 V2 [4,0]\nS3 0 V5 [3,3]\nS4 90 V3 [4,0]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-178\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-179.json b/voi/data/voi-179.json new file mode 100644 index 0000000000000000000000000000000000000000..8bfe071b43976d3fcaf66f32544839657f46c2e1 --- /dev/null +++ b/voi/data/voi-179.json @@ -0,0 +1,194 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 0, + 6 + ], + [ + 0, + 3 + ], + [ + 2, + 3 + ], + [ + 2, + 6 + ] + ] + }, + { + "polygon": [ + [ + 1, + 6 + ], + [ + 1, + 5 + ], + [ + 2, + 5 + ], + [ + 2, + 6 + ] + ] + }, + { + "polygon": [ + [ + 4, + 4 + ], + [ + 4, + 6 + ], + [ + 2, + 4 + ] + ] + } + ], + "meta": { + "seed": 4203081, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.22069, + "contourComplexity": 72, + "connectedComponents": 1, + "fillRatio": 0.110352, + "difficultyScore": 0.396538, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 180, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-179/target.png", + "shapes": { + "S1": "../images/voi-179/shape_S1.png", + "S2": "../images/voi-179/shape_S2.png", + "S3": "../images/voi-179/shape_S3.png", + "S4": "../images/voi-179/shape_S4.png" + } + }, + "ID": "voi-179", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 90, + "vertex": "V2", + "grid": [ + 0, + 3 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V4", + "grid": [ + 2, + 6 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V1", + "grid": [ + 4, + 4 + ] + } + ] + }, + "legacy_answer": "S2 90 V2 [0,3]\nS3 90 V4 [2,6]\nS4 270 V1 [4,4]", + "solutionText": "S2 90 V2 [0,3]\nS3 90 V4 [2,6]\nS4 270 V1 [4,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-179\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-180.json b/voi/data/voi-180.json new file mode 100644 index 0000000000000000000000000000000000000000..80848c3349151469dbd0f32fe7df22ca2135e17e --- /dev/null +++ b/voi/data/voi-180.json @@ -0,0 +1,210 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 7, + 1 + ], + [ + 7, + 4 + ], + [ + 6, + 4 + ], + [ + 6, + 1 + ] + ] + }, + { + "polygon": [ + [ + 5, + 1 + ], + [ + 7, + 1 + ], + [ + 7, + 2 + ], + [ + 6, + 2 + ], + [ + 6, + 4 + ], + [ + 5, + 4 + ] + ] + }, + { + "polygon": [ + [ + 3, + 2 + ], + [ + 5, + 2 + ], + [ + 3, + 4 + ] + ] + } + ], + "meta": { + "seed": 4203082, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.22069, + "contourComplexity": 72, + "connectedComponents": 1, + "fillRatio": 0.110352, + "difficultyScore": 0.396538, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 181, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-180/target.png", + "shapes": { + "S1": "../images/voi-180/shape_S1.png", + "S2": "../images/voi-180/shape_S2.png", + "S3": "../images/voi-180/shape_S3.png", + "S4": "../images/voi-180/shape_S4.png" + } + }, + "ID": "voi-180", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V4", + "grid": [ + 6, + 1 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V1", + "grid": [ + 5, + 1 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V2", + "grid": [ + 5, + 2 + ] + } + ] + }, + "legacy_answer": "S1 270 V4 [6,1]\nS3 0 V1 [5,1]\nS4 0 V2 [5,2]", + "solutionText": "S1 270 V4 [6,1]\nS3 0 V1 [5,1]\nS4 0 V2 [5,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-180\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-181.json b/voi/data/voi-181.json new file mode 100644 index 0000000000000000000000000000000000000000..0f7b007e967cc1fcfeed153ee4708a28208c8a84 --- /dev/null +++ b/voi/data/voi-181.json @@ -0,0 +1,218 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 7 + ], + [ + 3, + 7 + ], + [ + 3, + 6 + ], + [ + 4, + 6 + ], + [ + 4, + 4 + ], + [ + 5, + 4 + ] + ] + }, + { + "polygon": [ + [ + 2, + 7 + ], + [ + 3, + 7 + ], + [ + 3, + 8 + ], + [ + 2, + 8 + ] + ] + }, + { + "polygon": [ + [ + 3, + 5 + ], + [ + 3, + 8 + ], + [ + 1, + 8 + ], + [ + 1, + 5 + ] + ] + } + ], + "meta": { + "seed": 4203083, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.491477, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 182, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-181/target.png", + "shapes": { + "S1": "../images/voi-181/shape_S1.png", + "S2": "../images/voi-181/shape_S2.png", + "S3": "../images/voi-181/shape_S3.png", + "S4": "../images/voi-181/shape_S4.png" + } + }, + "ID": "voi-181", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V1", + "grid": [ + 5, + 7 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V1", + "grid": [ + 2, + 7 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V4", + "grid": [ + 1, + 5 + ] + } + ] + }, + "legacy_answer": "S1 180 V1 [5,7]\nS2 0 V1 [2,7]\nS3 270 V4 [1,5]", + "solutionText": "S1 180 V1 [5,7]\nS2 0 V1 [2,7]\nS3 270 V4 [1,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-181\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S2: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-182.json b/voi/data/voi-182.json new file mode 100644 index 0000000000000000000000000000000000000000..253bf410f3bb3e6b35b83614307cb025d7049933 --- /dev/null +++ b/voi/data/voi-182.json @@ -0,0 +1,202 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 4 + ], + [ + 6, + 4 + ], + [ + 6, + 6 + ], + [ + 4, + 6 + ] + ] + }, + { + "polygon": [ + [ + 7, + 7 + ], + [ + 6, + 7 + ], + [ + 6, + 5 + ], + [ + 7, + 5 + ] + ] + }, + { + "polygon": [ + [ + 7, + 6 + ], + [ + 7, + 7 + ], + [ + 4, + 7 + ], + [ + 4, + 6 + ] + ] + } + ], + "meta": { + "seed": 4203084, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "contourComplexity": 8, + "connectedComponents": 1, + "fillRatio": 0.109375, + "difficultyScore": 0.392361, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 183, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-182/target.png", + "shapes": { + "S1": "../images/voi-182/shape_S1.png", + "S2": "../images/voi-182/shape_S2.png", + "S3": "../images/voi-182/shape_S3.png", + "S4": "../images/voi-182/shape_S4.png" + } + }, + "ID": "voi-182", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V1", + "grid": [ + 4, + 4 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V3", + "grid": [ + 6, + 5 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V1", + "grid": [ + 7, + 6 + ] + } + ] + }, + "legacy_answer": "S1 0 V1 [4,4]\nS3 180 V3 [6,5]\nS4 270 V1 [7,6]", + "solutionText": "S1 0 V1 [4,4]\nS3 180 V3 [6,5]\nS4 270 V1 [7,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-182\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S3: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-183.json b/voi/data/voi-183.json new file mode 100644 index 0000000000000000000000000000000000000000..d54650232016f4df7b2be67bf08c3c8dc7fbf124 --- /dev/null +++ b/voi/data/voi-183.json @@ -0,0 +1,202 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 1, + 4 + ], + [ + 4, + 4 + ], + [ + 4, + 6 + ], + [ + 1, + 6 + ] + ] + }, + { + "polygon": [ + [ + 5, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 2 + ], + [ + 5, + 2 + ] + ] + }, + { + "polygon": [ + [ + 1, + 6 + ], + [ + 1, + 5 + ], + [ + 2, + 5 + ], + [ + 2, + 6 + ] + ] + } + ], + "meta": { + "seed": 4203085, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.491477, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 184, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-183/target.png", + "shapes": { + "S1": "../images/voi-183/shape_S1.png", + "S2": "../images/voi-183/shape_S2.png", + "S3": "../images/voi-183/shape_S3.png", + "S4": "../images/voi-183/shape_S4.png" + } + }, + "ID": "voi-183", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V2", + "grid": [ + 4, + 4 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V3", + "grid": [ + 3, + 2 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V1", + "grid": [ + 1, + 6 + ] + } + ] + }, + "legacy_answer": "S1 0 V2 [4,4]\nS2 180 V3 [3,2]\nS4 90 V1 [1,6]", + "solutionText": "S1 0 V2 [4,4]\nS2 180 V3 [3,2]\nS4 90 V1 [1,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-183\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-184.json b/voi/data/voi-184.json new file mode 100644 index 0000000000000000000000000000000000000000..c4d12f4fc166cb7a79a6e3529741d83305ca5213 --- /dev/null +++ b/voi/data/voi-184.json @@ -0,0 +1,226 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 6 + ], + [ + 5, + 8 + ], + [ + 4, + 8 + ], + [ + 4, + 7 + ], + [ + 2, + 7 + ], + [ + 2, + 6 + ] + ] + }, + { + "polygon": [ + [ + 5, + 4 + ], + [ + 6, + 4 + ], + [ + 6, + 7 + ], + [ + 5, + 7 + ] + ] + }, + { + "polygon": [ + [ + 6, + 6 + ], + [ + 3, + 6 + ], + [ + 3, + 4 + ], + [ + 6, + 4 + ] + ] + } + ], + "meta": { + "seed": 4203086, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.307692, + "contourComplexity": 12, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.649519, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 185, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-184/target.png", + "shapes": { + "S1": "../images/voi-184/shape_S1.png", + "S2": "../images/voi-184/shape_S2.png", + "S3": "../images/voi-184/shape_S3.png", + "S4": "../images/voi-184/shape_S4.png" + } + }, + "ID": "voi-184", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V1", + "grid": [ + 5, + 6 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V1", + "grid": [ + 5, + 4 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V2", + "grid": [ + 3, + 6 + ] + } + ] + }, + "legacy_answer": "S1 270 V1 [5,6]\nS3 0 V1 [5,4]\nS4 180 V2 [3,6]", + "solutionText": "S1 270 V1 [5,6]\nS3 0 V1 [5,4]\nS4 180 V2 [3,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-184\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-185.json b/voi/data/voi-185.json new file mode 100644 index 0000000000000000000000000000000000000000..c35400f1989ce54ab71afdaef58278e3bdf95592 --- /dev/null +++ b/voi/data/voi-185.json @@ -0,0 +1,202 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 5 + ], + [ + 3, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 5 + ] + ] + }, + { + "polygon": [ + [ + 3, + 5 + ], + [ + 1, + 5 + ], + [ + 1, + 4 + ], + [ + 3, + 4 + ] + ] + }, + { + "polygon": [ + [ + 1, + 2 + ], + [ + 4, + 2 + ], + [ + 4, + 4 + ], + [ + 1, + 4 + ] + ] + } + ], + "meta": { + "seed": 4203087, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "contourComplexity": 8, + "connectedComponents": 1, + "fillRatio": 0.125, + "difficultyScore": 0.45, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 186, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-185/target.png", + "shapes": { + "S1": "../images/voi-185/shape_S1.png", + "S2": "../images/voi-185/shape_S2.png", + "S3": "../images/voi-185/shape_S3.png", + "S4": "../images/voi-185/shape_S4.png" + } + }, + "ID": "voi-185", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 90, + "vertex": "V1", + "grid": [ + 3, + 5 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V2", + "grid": [ + 1, + 5 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V1", + "grid": [ + 1, + 2 + ] + } + ] + }, + "legacy_answer": "S2 90 V1 [3,5]\nS3 180 V2 [1,5]\nS4 0 V1 [1,2]", + "solutionText": "S2 90 V1 [3,5]\nS3 180 V2 [1,5]\nS4 0 V1 [1,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-185\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-186.json b/voi/data/voi-186.json new file mode 100644 index 0000000000000000000000000000000000000000..14c790f1f4f63688e192db6cd404600e8def55a7 --- /dev/null +++ b/voi/data/voi-186.json @@ -0,0 +1,206 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 7, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 3 + ], + [ + 6, + 3 + ], + [ + 6, + 1 + ], + [ + 7, + 1 + ] + ] + }, + { + "polygon": [ + [ + 4, + 4 + ], + [ + 4, + 2 + ], + [ + 6, + 4 + ] + ] + }, + { + "polygon": [ + [ + 6, + 3 + ], + [ + 5, + 3 + ], + [ + 5, + 0 + ], + [ + 6, + 0 + ] + ] + } + ], + "meta": { + "seed": 4203088, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.117241, + "contourComplexity": 72, + "connectedComponents": 1, + "fillRatio": 0.125, + "difficultyScore": 0.781034, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 187, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-186/target.png", + "shapes": { + "S1": "../images/voi-186/shape_S1.png", + "S2": "../images/voi-186/shape_S2.png", + "S3": "../images/voi-186/shape_S3.png", + "S4": "../images/voi-186/shape_S4.png" + } + }, + "ID": "voi-186", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 180, + "vertex": "V1", + "grid": [ + 7, + 4 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V3", + "grid": [ + 6, + 4 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V4", + "grid": [ + 6, + 0 + ] + } + ] + }, + "legacy_answer": "S2 180 V1 [7,4]\nS3 90 V3 [6,4]\nS4 180 V4 [6,0]", + "solutionText": "S2 180 V1 [7,4]\nS3 90 V3 [6,4]\nS4 180 V4 [6,0]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-186\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-187.json b/voi/data/voi-187.json new file mode 100644 index 0000000000000000000000000000000000000000..0d0ba101f374aaad9f63a1e25ea86b1f9ea948d3 --- /dev/null +++ b/voi/data/voi-187.json @@ -0,0 +1,202 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 4 + ], + [ + 6, + 6 + ], + [ + 5, + 6 + ], + [ + 5, + 4 + ] + ] + }, + { + "polygon": [ + [ + 3, + 7 + ], + [ + 3, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 7 + ] + ] + }, + { + "polygon": [ + [ + 6, + 6 + ], + [ + 6, + 8 + ], + [ + 4, + 8 + ], + [ + 4, + 6 + ] + ] + } + ], + "meta": { + "seed": 4203089, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.166667, + "contourComplexity": 11, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.520833, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 188, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-187/target.png", + "shapes": { + "S1": "../images/voi-187/shape_S1.png", + "S2": "../images/voi-187/shape_S2.png", + "S3": "../images/voi-187/shape_S3.png", + "S4": "../images/voi-187/shape_S4.png" + } + }, + "ID": "voi-187", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V4", + "grid": [ + 5, + 4 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V1", + "grid": [ + 3, + 7 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V4", + "grid": [ + 4, + 6 + ] + } + ] + }, + "legacy_answer": "S1 270 V4 [5,4]\nS2 90 V1 [3,7]\nS4 270 V4 [4,6]", + "solutionText": "S1 270 V4 [5,4]\nS2 90 V1 [3,7]\nS4 270 V4 [4,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-187\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-188.json b/voi/data/voi-188.json new file mode 100644 index 0000000000000000000000000000000000000000..2de44ee2b4123378d520a23f63ccf363c7fa2324 --- /dev/null +++ b/voi/data/voi-188.json @@ -0,0 +1,194 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 3 + ], + [ + 4, + 3 + ], + [ + 3, + 4 + ] + ] + }, + { + "polygon": [ + [ + 5, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 2 + ], + [ + 5, + 2 + ] + ] + }, + { + "polygon": [ + [ + 5, + 7 + ], + [ + 4, + 7 + ], + [ + 4, + 4 + ], + [ + 5, + 4 + ] + ] + } + ], + "meta": { + "seed": 4203090, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.141079, + "contourComplexity": 38, + "connectedComponents": 1, + "fillRatio": 0.101074, + "difficultyScore": 0.733536, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 189, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-188/target.png", + "shapes": { + "S1": "../images/voi-188/shape_S1.png", + "S2": "../images/voi-188/shape_S2.png", + "S3": "../images/voi-188/shape_S3.png", + "S4": "../images/voi-188/shape_S4.png" + } + }, + "ID": "voi-188", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V1", + "grid": [ + 3, + 3 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V2", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V3", + "grid": [ + 4, + 4 + ] + } + ] + }, + "legacy_answer": "S1 0 V1 [3,3]\nS2 180 V2 [3,4]\nS3 180 V3 [4,4]", + "solutionText": "S1 0 V1 [3,3]\nS2 180 V2 [3,4]\nS3 180 V3 [4,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-188\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-189.json b/voi/data/voi-189.json new file mode 100644 index 0000000000000000000000000000000000000000..31fcf4dda9a5edf9d824487cb8b4d0aba122e40e --- /dev/null +++ b/voi/data/voi-189.json @@ -0,0 +1,202 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 7, + 2 + ], + [ + 4, + 2 + ], + [ + 4, + 0 + ], + [ + 7, + 0 + ] + ] + }, + { + "polygon": [ + [ + 6, + 1 + ], + [ + 4, + 1 + ], + [ + 4, + 0 + ], + [ + 6, + 0 + ] + ] + }, + { + "polygon": [ + [ + 5, + 2 + ], + [ + 8, + 2 + ], + [ + 8, + 4 + ], + [ + 5, + 4 + ] + ] + } + ], + "meta": { + "seed": 4203091, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.530357, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 190, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-189/target.png", + "shapes": { + "S1": "../images/voi-189/shape_S1.png", + "S2": "../images/voi-189/shape_S2.png", + "S3": "../images/voi-189/shape_S3.png", + "S4": "../images/voi-189/shape_S4.png" + } + }, + "ID": "voi-189", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 180, + "vertex": "V1", + "grid": [ + 7, + 2 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V3", + "grid": [ + 4, + 0 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V2", + "grid": [ + 8, + 2 + ] + } + ] + }, + "legacy_answer": "S2 180 V1 [7,2]\nS3 180 V3 [4,0]\nS4 0 V2 [8,2]", + "solutionText": "S2 180 V1 [7,2]\nS3 180 V3 [4,0]\nS4 0 V2 [8,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-189\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-190.json b/voi/data/voi-190.json new file mode 100644 index 0000000000000000000000000000000000000000..9a2afebf1f72d24066f0c342e3638afd88aa8303 --- /dev/null +++ b/voi/data/voi-190.json @@ -0,0 +1,202 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 5 + ], + [ + 5, + 4 + ], + [ + 6, + 4 + ], + [ + 6, + 5 + ] + ] + }, + { + "polygon": [ + [ + 5, + 0 + ], + [ + 7, + 0 + ], + [ + 7, + 2 + ], + [ + 5, + 2 + ] + ] + }, + { + "polygon": [ + [ + 6, + 2 + ], + [ + 6, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 2 + ] + ] + } + ], + "meta": { + "seed": 4203092, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.491477, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 191, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-190/target.png", + "shapes": { + "S1": "../images/voi-190/shape_S1.png", + "S2": "../images/voi-190/shape_S2.png", + "S3": "../images/voi-190/shape_S3.png", + "S4": "../images/voi-190/shape_S4.png" + } + }, + "ID": "voi-190", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 90, + "vertex": "V2", + "grid": [ + 5, + 4 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V2", + "grid": [ + 7, + 0 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V1", + "grid": [ + 6, + 2 + ] + } + ] + }, + "legacy_answer": "S2 90 V2 [5,4]\nS3 0 V2 [7,0]\nS4 270 V1 [6,2]", + "solutionText": "S2 90 V2 [5,4]\nS3 0 V2 [7,0]\nS4 270 V1 [6,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-190\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-191.json b/voi/data/voi-191.json new file mode 100644 index 0000000000000000000000000000000000000000..f18ff362856c8f6aa22a0cfc3bf49b207768f95a --- /dev/null +++ b/voi/data/voi-191.json @@ -0,0 +1,190 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 7, + 7 + ], + [ + 7, + 6 + ], + [ + 8, + 7 + ] + ] + }, + { + "polygon": [ + [ + 6, + 7 + ], + [ + 6, + 4 + ], + [ + 8, + 4 + ], + [ + 8, + 7 + ] + ] + }, + { + "polygon": [ + [ + 5, + 6 + ], + [ + 8, + 6 + ], + [ + 8, + 8 + ], + [ + 5, + 8 + ] + ] + } + ], + "meta": { + "seed": 4203093, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.319202, + "contourComplexity": 43, + "connectedComponents": 1, + "fillRatio": 0.133301, + "difficultyScore": 0.710206, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 192, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-191/target.png", + "shapes": { + "S1": "../images/voi-191/shape_S1.png", + "S2": "../images/voi-191/shape_S2.png", + "S3": "../images/voi-191/shape_S3.png", + "S4": "../images/voi-191/shape_S4.png" + } + }, + "ID": "voi-191", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V1", + "grid": [ + 7, + 7 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V1", + "grid": [ + 6, + 7 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V4", + "grid": [ + 5, + 8 + ] + } + ] + }, + "legacy_answer": "S1 90 V1 [7,7]\nS2 90 V1 [6,7]\nS4 0 V4 [5,8]", + "solutionText": "S1 90 V1 [7,7]\nS2 90 V1 [6,7]\nS4 0 V4 [5,8]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-191\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-192.json b/voi/data/voi-192.json new file mode 100644 index 0000000000000000000000000000000000000000..d908a44ef8f6b25beac913f8d7e946021bc9ee51 --- /dev/null +++ b/voi/data/voi-192.json @@ -0,0 +1,198 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 1 + ], + [ + 4, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 1 + ] + ] + }, + { + "polygon": [ + [ + 3, + 2 + ], + [ + 3, + 1 + ], + [ + 6, + 1 + ], + [ + 6, + 2 + ] + ] + }, + { + "polygon": [ + [ + 4, + 2 + ], + [ + 1, + 2 + ], + [ + 2, + 1 + ], + [ + 4, + 1 + ] + ] + } + ], + "meta": { + "seed": 4203094, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.234432, + "contourComplexity": 38, + "connectedComponents": 1, + "fillRatio": 0.102051, + "difficultyScore": 0.433627, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 193, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-192/target.png", + "shapes": { + "S1": "../images/voi-192/shape_S1.png", + "S2": "../images/voi-192/shape_S2.png", + "S3": "../images/voi-192/shape_S3.png", + "S4": "../images/voi-192/shape_S4.png" + } + }, + "ID": "voi-192", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V3", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V2", + "grid": [ + 3, + 1 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V1", + "grid": [ + 4, + 2 + ] + } + ] + }, + "legacy_answer": "S1 270 V3 [3,4]\nS2 90 V2 [3,1]\nS3 180 V1 [4,2]", + "solutionText": "S1 270 V3 [3,4]\nS2 90 V2 [3,1]\nS3 180 V1 [4,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-192\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S2: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S3: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[1,0], V3=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-193.json b/voi/data/voi-193.json new file mode 100644 index 0000000000000000000000000000000000000000..f7a3caa9d2657a0f7ca8b3722e4d90bc23df8da2 --- /dev/null +++ b/voi/data/voi-193.json @@ -0,0 +1,210 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 4 + ], + [ + 5, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 4 + ] + ] + }, + { + "polygon": [ + [ + 3, + 5 + ], + [ + 5, + 5 + ], + [ + 3, + 7 + ] + ] + }, + { + "polygon": [ + [ + 2, + 7 + ], + [ + 2, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 6 + ], + [ + 5, + 6 + ], + [ + 5, + 7 + ] + ] + } + ], + "meta": { + "seed": 4203095, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.131783, + "contourComplexity": 72, + "connectedComponents": 1, + "fillRatio": 0.109375, + "difficultyScore": 0.754118, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 194, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-193/target.png", + "shapes": { + "S1": "../images/voi-193/shape_S1.png", + "S2": "../images/voi-193/shape_S2.png", + "S3": "../images/voi-193/shape_S3.png", + "S4": "../images/voi-193/shape_S4.png" + } + }, + "ID": "voi-193", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V1", + "grid": [ + 5, + 4 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V2", + "grid": [ + 5, + 5 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V4", + "grid": [ + 3, + 6 + ] + } + ] + }, + "legacy_answer": "S1 270 V1 [5,4]\nS2 0 V2 [5,5]\nS3 90 V4 [3,6]", + "solutionText": "S1 270 V1 [5,4]\nS2 0 V2 [5,5]\nS3 90 V4 [3,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-193\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-194.json b/voi/data/voi-194.json new file mode 100644 index 0000000000000000000000000000000000000000..ed1302aa6f4145f2ff99d2fef848054852710694 --- /dev/null +++ b/voi/data/voi-194.json @@ -0,0 +1,218 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 0 + ], + [ + 6, + 0 + ], + [ + 6, + 1 + ], + [ + 5, + 1 + ], + [ + 5, + 3 + ], + [ + 4, + 3 + ] + ] + }, + { + "polygon": [ + [ + 5, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 2 + ], + [ + 5, + 2 + ] + ] + }, + { + "polygon": [ + [ + 2, + 0 + ], + [ + 4, + 0 + ], + [ + 4, + 2 + ], + [ + 2, + 2 + ] + ] + } + ], + "meta": { + "seed": 4203096, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "contourComplexity": 6, + "connectedComponents": 1, + "fillRatio": 0.109375, + "difficultyScore": 0.392361, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 195, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-194/target.png", + "shapes": { + "S1": "../images/voi-194/shape_S1.png", + "S2": "../images/voi-194/shape_S2.png", + "S3": "../images/voi-194/shape_S3.png", + "S4": "../images/voi-194/shape_S4.png" + } + }, + "ID": "voi-194", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 0, + "vertex": "V5", + "grid": [ + 5, + 3 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V3", + "grid": [ + 4, + 2 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V2", + "grid": [ + 4, + 0 + ] + } + ] + }, + "legacy_answer": "S2 0 V5 [5,3]\nS3 180 V3 [4,2]\nS4 0 V2 [4,0]", + "solutionText": "S2 0 V5 [5,3]\nS3 180 V3 [4,2]\nS4 0 V2 [4,0]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-194\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-195.json b/voi/data/voi-195.json new file mode 100644 index 0000000000000000000000000000000000000000..192ab5149e56339704a93be33457ec957b5c4446 --- /dev/null +++ b/voi/data/voi-195.json @@ -0,0 +1,190 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 5 + ], + [ + 6, + 7 + ], + [ + 4, + 5 + ] + ] + }, + { + "polygon": [ + [ + 6, + 6 + ], + [ + 6, + 8 + ], + [ + 4, + 8 + ], + [ + 4, + 6 + ] + ] + }, + { + "polygon": [ + [ + 2, + 6 + ], + [ + 2, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 6 + ] + ] + } + ], + "meta": { + "seed": 4203097, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.131783, + "contourComplexity": 72, + "connectedComponents": 1, + "fillRatio": 0.109375, + "difficultyScore": 0.754118, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 196, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-195/target.png", + "shapes": { + "S1": "../images/voi-195/shape_S1.png", + "S2": "../images/voi-195/shape_S2.png", + "S3": "../images/voi-195/shape_S3.png", + "S4": "../images/voi-195/shape_S4.png" + } + }, + "ID": "voi-195", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 270, + "vertex": "V2", + "grid": [ + 6, + 7 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V1", + "grid": [ + 6, + 6 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V4", + "grid": [ + 4, + 6 + ] + } + ] + }, + "legacy_answer": "S2 270 V2 [6,7]\nS3 270 V1 [6,6]\nS4 90 V4 [4,6]", + "solutionText": "S2 270 V2 [6,7]\nS3 270 V1 [6,6]\nS4 90 V4 [4,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-195\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-196.json b/voi/data/voi-196.json new file mode 100644 index 0000000000000000000000000000000000000000..ca1809f904107a19e9e85ab3d86997f76329a5e3 --- /dev/null +++ b/voi/data/voi-196.json @@ -0,0 +1,194 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 6 + ], + [ + 2, + 6 + ] + ] + }, + { + "polygon": [ + [ + 2, + 6 + ], + [ + 2, + 5 + ], + [ + 3, + 6 + ] + ] + }, + { + "polygon": [ + [ + 5, + 6 + ], + [ + 5, + 4 + ], + [ + 6, + 4 + ], + [ + 6, + 6 + ] + ] + } + ], + "meta": { + "seed": 4203098, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.124542, + "contourComplexity": 36, + "connectedComponents": 1, + "fillRatio": 0.116699, + "difficultyScore": 0.768433, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 197, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-196/target.png", + "shapes": { + "S1": "../images/voi-196/shape_S1.png", + "S2": "../images/voi-196/shape_S2.png", + "S3": "../images/voi-196/shape_S3.png", + "S4": "../images/voi-196/shape_S4.png" + } + }, + "ID": "voi-196", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V3", + "grid": [ + 5, + 6 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V2", + "grid": [ + 2, + 5 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V4", + "grid": [ + 6, + 6 + ] + } + ] + }, + "legacy_answer": "S1 0 V3 [5,6]\nS3 90 V2 [2,5]\nS4 90 V4 [6,6]", + "solutionText": "S1 0 V3 [5,6]\nS3 90 V2 [2,5]\nS4 90 V4 [6,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-196\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S3: V1=[0,0], V2=[1,0], V3=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-197.json b/voi/data/voi-197.json new file mode 100644 index 0000000000000000000000000000000000000000..ffba01df56cac671344091feefe574b8ac09e101 --- /dev/null +++ b/voi/data/voi-197.json @@ -0,0 +1,202 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 6 + ], + [ + 3, + 6 + ], + [ + 3, + 4 + ], + [ + 6, + 4 + ] + ] + }, + { + "polygon": [ + [ + 5, + 6 + ], + [ + 5, + 7 + ], + [ + 2, + 7 + ], + [ + 2, + 6 + ] + ] + }, + { + "polygon": [ + [ + 2, + 6 + ], + [ + 2, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 6 + ] + ] + } + ], + "meta": { + "seed": 4203099, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "contourComplexity": 13, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.491477, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 198, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-197/target.png", + "shapes": { + "S1": "../images/voi-197/shape_S1.png", + "S2": "../images/voi-197/shape_S2.png", + "S3": "../images/voi-197/shape_S3.png", + "S4": "../images/voi-197/shape_S4.png" + } + }, + "ID": "voi-197", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V3", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V2", + "grid": [ + 5, + 7 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V1", + "grid": [ + 2, + 6 + ] + } + ] + }, + "legacy_answer": "S1 180 V3 [3,4]\nS2 270 V2 [5,7]\nS3 90 V1 [2,6]", + "solutionText": "S1 180 V3 [3,4]\nS2 270 V2 [5,7]\nS3 90 V1 [2,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-197\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S3: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-198.json b/voi/data/voi-198.json new file mode 100644 index 0000000000000000000000000000000000000000..50eb5e3424ebae35bee2e7b05115781a437e575d --- /dev/null +++ b/voi/data/voi-198.json @@ -0,0 +1,210 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 4 + ], + [ + 0, + 4 + ], + [ + 2, + 2 + ] + ] + }, + { + "polygon": [ + [ + 4, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 1 + ], + [ + 4, + 1 + ] + ] + }, + { + "polygon": [ + [ + 2, + 1 + ], + [ + 4, + 1 + ], + [ + 4, + 2 + ], + [ + 3, + 2 + ], + [ + 3, + 4 + ], + [ + 2, + 4 + ] + ] + } + ], + "meta": { + "seed": 4203100, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.22069, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.110352, + "difficultyScore": 0.396538, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 199, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-198/target.png", + "shapes": { + "S1": "../images/voi-198/shape_S1.png", + "S2": "../images/voi-198/shape_S2.png", + "S3": "../images/voi-198/shape_S3.png", + "S4": "../images/voi-198/shape_S4.png" + } + }, + "ID": "voi-198", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V2", + "grid": [ + 0, + 4 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V3", + "grid": [ + 3, + 1 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V3", + "grid": [ + 4, + 2 + ] + } + ] + }, + "legacy_answer": "S1 180 V2 [0,4]\nS3 180 V3 [3,1]\nS4 0 V3 [4,2]", + "solutionText": "S1 180 V2 [0,4]\nS3 180 V3 [3,1]\nS4 0 V3 [4,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-198\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-199.json b/voi/data/voi-199.json new file mode 100644 index 0000000000000000000000000000000000000000..01b03037ea5c17842323f1c4d92724f69966b3d0 --- /dev/null +++ b/voi/data/voi-199.json @@ -0,0 +1,218 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 4 + ], + [ + 4, + 4 + ], + [ + 4, + 1 + ], + [ + 5, + 1 + ] + ] + }, + { + "polygon": [ + [ + 3, + 7 + ], + [ + 3, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 7 + ] + ] + }, + { + "polygon": [ + [ + 6, + 7 + ], + [ + 4, + 7 + ], + [ + 4, + 6 + ], + [ + 5, + 6 + ], + [ + 5, + 4 + ], + [ + 6, + 4 + ] + ] + } + ], + "meta": { + "seed": 4203101, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.153846, + "contourComplexity": 12, + "connectedComponents": 1, + "fillRatio": 0.171875, + "difficultyScore": 0.540865, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 200, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-199/target.png", + "shapes": { + "S1": "../images/voi-199/shape_S1.png", + "S2": "../images/voi-199/shape_S2.png", + "S3": "../images/voi-199/shape_S3.png", + "S4": "../images/voi-199/shape_S4.png" + } + }, + "ID": "voi-199", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V1", + "grid": [ + 5, + 4 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V3", + "grid": [ + 5, + 4 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V1", + "grid": [ + 6, + 7 + ] + } + ] + }, + "legacy_answer": "S1 180 V1 [5,4]\nS2 90 V3 [5,4]\nS4 180 V1 [6,7]", + "solutionText": "S1 180 V1 [5,4]\nS2 90 V3 [5,4]\nS4 180 V1 [6,7]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-199\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-200.json b/voi/data/voi-200.json new file mode 100644 index 0000000000000000000000000000000000000000..08732d1da7d73c56fc627dc99a92baf5805f6f71 --- /dev/null +++ b/voi/data/voi-200.json @@ -0,0 +1,253 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 0 + ], + [ + 6, + 0 + ], + [ + 6, + 2 + ], + [ + 3, + 2 + ] + ] + }, + { + "polygon": [ + [ + 4, + 4 + ], + [ + 2, + 4 + ], + [ + 2, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 1 + ], + [ + 4, + 1 + ] + ] + }, + { + "polygon": [ + [ + 2, + 1 + ], + [ + 4, + 1 + ], + [ + 4, + 2 + ], + [ + 3, + 2 + ], + [ + 3, + 4 + ], + [ + 2, + 4 + ] + ] + } + ], + "meta": { + "seed": 4204001, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.430357, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 201, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-200/target.png", + "shapes": { + "S1": "../images/voi-200/shape_S1.png", + "S2": "../images/voi-200/shape_S2.png", + "S3": "../images/voi-200/shape_S3.png", + "S4": "../images/voi-200/shape_S4.png", + "S5": "../images/voi-200/shape_S5.png" + } + }, + "ID": "voi-200", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V4", + "grid": [ + 3, + 2 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V6", + "grid": [ + 4, + 1 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V5", + "grid": [ + 3, + 4 + ] + } + ] + }, + "legacy_answer": "S1 0 V4 [3,2]\nS3 180 V6 [4,1]\nS5 0 V5 [3,4]", + "solutionText": "S1 0 V4 [3,2]\nS3 180 V6 [4,1]\nS5 0 V5 [3,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-200\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-201.json b/voi/data/voi-201.json new file mode 100644 index 0000000000000000000000000000000000000000..04865fd01f2d24aed55bd9b2ff968bc900b45d47 --- /dev/null +++ b/voi/data/voi-201.json @@ -0,0 +1,221 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 2 + ], + [ + 2, + 2 + ], + [ + 3, + 1 + ], + [ + 5, + 1 + ] + ] + }, + { + "polygon": [ + [ + 2, + 0 + ], + [ + 2, + 3 + ], + [ + 0, + 3 + ], + [ + 0, + 0 + ] + ] + }, + { + "polygon": [ + [ + 1, + 2 + ], + [ + 3, + 2 + ], + [ + 3, + 3 + ], + [ + 1, + 3 + ] + ] + } + ], + "meta": { + "seed": 4204002, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.189911, + "contourComplexity": 42, + "connectedComponents": 1, + "fillRatio": 0.133301, + "difficultyScore": 0.573755, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 202, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-201/target.png", + "shapes": { + "S1": "../images/voi-201/shape_S1.png", + "S2": "../images/voi-201/shape_S2.png", + "S3": "../images/voi-201/shape_S3.png", + "S4": "../images/voi-201/shape_S4.png", + "S5": "../images/voi-201/shape_S5.png" + } + }, + "ID": "voi-201", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V2", + "grid": [ + 2, + 2 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V4", + "grid": [ + 0, + 0 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V3", + "grid": [ + 3, + 3 + ] + } + ] + }, + "legacy_answer": "S1 180 V2 [2,2]\nS3 270 V4 [0,0]\nS4 0 V3 [3,3]", + "solutionText": "S1 180 V2 [2,2]\nS3 270 V4 [0,0]\nS4 0 V3 [3,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-201\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S5: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-202.json b/voi/data/voi-202.json new file mode 100644 index 0000000000000000000000000000000000000000..9b1e09aa47f25dc57bb125411b25fa2f0eb366e0 --- /dev/null +++ b/voi/data/voi-202.json @@ -0,0 +1,237 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 5 + ], + [ + 2, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 5 + ] + ] + }, + { + "polygon": [ + [ + 5, + 2 + ], + [ + 5, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 2 + ] + ] + }, + { + "polygon": [ + [ + 4, + 0 + ], + [ + 6, + 0 + ], + [ + 6, + 2 + ], + [ + 4, + 2 + ] + ] + } + ], + "meta": { + "seed": 4204003, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "contourComplexity": 12, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.430357, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 203, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-202/target.png", + "shapes": { + "S1": "../images/voi-202/shape_S1.png", + "S2": "../images/voi-202/shape_S2.png", + "S3": "../images/voi-202/shape_S3.png", + "S4": "../images/voi-202/shape_S4.png", + "S5": "../images/voi-202/shape_S5.png" + } + }, + "ID": "voi-202", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V1", + "grid": [ + 2, + 5 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V1", + "grid": [ + 5, + 2 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V3", + "grid": [ + 6, + 2 + ] + } + ] + }, + "legacy_answer": "S1 90 V1 [2,5]\nS2 270 V1 [5,2]\nS4 0 V3 [6,2]", + "solutionText": "S1 90 V1 [2,5]\nS2 270 V1 [5,2]\nS4 0 V3 [6,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-202\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S5: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-203.json b/voi/data/voi-203.json new file mode 100644 index 0000000000000000000000000000000000000000..fc5b6d99d1c7606ad623a2eb2892bf9a8699d1d7 --- /dev/null +++ b/voi/data/voi-203.json @@ -0,0 +1,237 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 5 + ], + [ + 6, + 2 + ], + [ + 8, + 2 + ], + [ + 8, + 5 + ] + ] + }, + { + "polygon": [ + [ + 6, + 6 + ], + [ + 4, + 6 + ], + [ + 4, + 5 + ], + [ + 5, + 5 + ], + [ + 5, + 3 + ], + [ + 6, + 3 + ] + ] + }, + { + "polygon": [ + [ + 4, + 6 + ], + [ + 4, + 5 + ], + [ + 7, + 5 + ], + [ + 7, + 6 + ] + ] + } + ], + "meta": { + "seed": 4204004, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.307692, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.549519, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 204, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-203/target.png", + "shapes": { + "S1": "../images/voi-203/shape_S1.png", + "S2": "../images/voi-203/shape_S2.png", + "S3": "../images/voi-203/shape_S3.png", + "S4": "../images/voi-203/shape_S4.png", + "S5": "../images/voi-203/shape_S5.png" + } + }, + "ID": "voi-203", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 90, + "vertex": "V1", + "grid": [ + 6, + 5 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V3", + "grid": [ + 4, + 5 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V1", + "grid": [ + 4, + 6 + ] + } + ] + }, + "legacy_answer": "S2 90 V1 [6,5]\nS3 180 V3 [4,5]\nS4 90 V1 [4,6]", + "solutionText": "S2 90 V1 [6,5]\nS3 180 V3 [4,5]\nS4 90 V1 [4,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-203\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-204.json b/voi/data/voi-204.json new file mode 100644 index 0000000000000000000000000000000000000000..ed3ddef9b65375a0f6fcbb1729baad25dcf8941e --- /dev/null +++ b/voi/data/voi-204.json @@ -0,0 +1,229 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 7 + ], + [ + 3, + 7 + ], + [ + 4, + 6 + ] + ] + }, + { + "polygon": [ + [ + 1, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 7 + ], + [ + 1, + 7 + ] + ] + }, + { + "polygon": [ + [ + 3, + 8 + ], + [ + 3, + 6 + ], + [ + 4, + 6 + ], + [ + 4, + 7 + ], + [ + 6, + 7 + ], + [ + 6, + 8 + ] + ] + } + ], + "meta": { + "seed": 4204005, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.189911, + "contourComplexity": 41, + "connectedComponents": 1, + "fillRatio": 0.133301, + "difficultyScore": 0.573755, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 205, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-204/target.png", + "shapes": { + "S1": "../images/voi-204/shape_S1.png", + "S2": "../images/voi-204/shape_S2.png", + "S3": "../images/voi-204/shape_S3.png", + "S4": "../images/voi-204/shape_S4.png", + "S5": "../images/voi-204/shape_S5.png" + } + }, + "ID": "voi-204", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 180, + "vertex": "V1", + "grid": [ + 4, + 7 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V1", + "grid": [ + 1, + 5 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V6", + "grid": [ + 6, + 8 + ] + } + ] + }, + "legacy_answer": "S2 180 V1 [4,7]\nS3 0 V1 [1,5]\nS5 90 V6 [6,8]", + "solutionText": "S2 180 V1 [4,7]\nS3 0 V1 [1,5]\nS5 90 V6 [6,8]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-204\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[0,1]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-205.json b/voi/data/voi-205.json new file mode 100644 index 0000000000000000000000000000000000000000..54a78258375b4a2d3368472a3854f3000aea1974 --- /dev/null +++ b/voi/data/voi-205.json @@ -0,0 +1,221 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 6 + ], + [ + 5, + 6 + ], + [ + 3, + 8 + ] + ] + }, + { + "polygon": [ + [ + 4, + 3 + ], + [ + 6, + 3 + ], + [ + 6, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 6 + ], + [ + 4, + 6 + ] + ] + }, + { + "polygon": [ + [ + 8, + 5 + ], + [ + 5, + 5 + ], + [ + 5, + 3 + ], + [ + 8, + 3 + ] + ] + } + ], + "meta": { + "seed": 4204006, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.165803, + "contourComplexity": 74, + "connectedComponents": 1, + "fillRatio": 0.157227, + "difficultyScore": 0.622334, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 206, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-205/target.png", + "shapes": { + "S1": "../images/voi-205/shape_S1.png", + "S2": "../images/voi-205/shape_S2.png", + "S3": "../images/voi-205/shape_S3.png", + "S4": "../images/voi-205/shape_S4.png", + "S5": "../images/voi-205/shape_S5.png" + } + }, + "ID": "voi-205", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V2", + "grid": [ + 5, + 6 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V5", + "grid": [ + 5, + 6 + ] + }, + { + "shape": "S5", + "angle": 180, + "vertex": "V1", + "grid": [ + 8, + 5 + ] + } + ] + }, + "legacy_answer": "S1 0 V2 [5,6]\nS3 0 V5 [5,6]\nS5 180 V1 [8,5]", + "solutionText": "S1 0 V2 [5,6]\nS3 0 V5 [5,6]\nS5 180 V1 [8,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-205\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[1,0], V3=[0,1]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-206.json b/voi/data/voi-206.json new file mode 100644 index 0000000000000000000000000000000000000000..882442b6aa3ed93e34a3ae117926f0926ddc9daf --- /dev/null +++ b/voi/data/voi-206.json @@ -0,0 +1,221 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 8, + 7 + ], + [ + 7, + 7 + ], + [ + 7, + 6 + ], + [ + 8, + 6 + ] + ] + }, + { + "polygon": [ + [ + 4, + 5 + ], + [ + 7, + 5 + ], + [ + 7, + 7 + ], + [ + 4, + 7 + ] + ] + }, + { + "polygon": [ + [ + 5, + 4 + ], + [ + 8, + 4 + ], + [ + 8, + 6 + ], + [ + 5, + 6 + ] + ] + } + ], + "meta": { + "seed": 4204007, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.307692, + "contourComplexity": 11, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.549519, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 207, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-206/target.png", + "shapes": { + "S1": "../images/voi-206/shape_S1.png", + "S2": "../images/voi-206/shape_S2.png", + "S3": "../images/voi-206/shape_S3.png", + "S4": "../images/voi-206/shape_S4.png", + "S5": "../images/voi-206/shape_S5.png" + } + }, + "ID": "voi-206", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 180, + "vertex": "V3", + "grid": [ + 7, + 6 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V1", + "grid": [ + 4, + 5 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V4", + "grid": [ + 5, + 6 + ] + } + ] + }, + "legacy_answer": "S2 180 V3 [7,6]\nS3 0 V1 [4,5]\nS5 0 V4 [5,6]", + "solutionText": "S2 180 V3 [7,6]\nS3 0 V1 [4,5]\nS5 0 V4 [5,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-206\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-207.json b/voi/data/voi-207.json new file mode 100644 index 0000000000000000000000000000000000000000..ecd6404ef31bb3ed86e4a534e32da8d32c3fd988 --- /dev/null +++ b/voi/data/voi-207.json @@ -0,0 +1,201 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 6 + ], + [ + 3, + 6 + ], + [ + 3, + 4 + ], + [ + 6, + 4 + ] + ] + }, + { + "polygon": [ + [ + 6, + 5 + ], + [ + 6, + 6 + ], + [ + 5, + 5 + ] + ] + }, + { + "polygon": [ + [ + 6, + 3 + ], + [ + 6, + 5 + ], + [ + 4, + 3 + ] + ] + } + ], + "meta": { + "seed": 4204008, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.247273, + "contourComplexity": 100, + "connectedComponents": 1, + "fillRatio": 0.101074, + "difficultyScore": 0.408761, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 208, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-207/target.png", + "shapes": { + "S1": "../images/voi-207/shape_S1.png", + "S2": "../images/voi-207/shape_S2.png", + "S3": "../images/voi-207/shape_S3.png", + "S4": "../images/voi-207/shape_S4.png", + "S5": "../images/voi-207/shape_S5.png" + } + }, + "ID": "voi-207", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V4", + "grid": [ + 6, + 4 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V2", + "grid": [ + 6, + 6 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V3", + "grid": [ + 4, + 3 + ] + } + ] + }, + "legacy_answer": "S1 180 V4 [6,4]\nS3 270 V2 [6,6]\nS4 270 V3 [4,3]", + "solutionText": "S1 180 V4 [6,4]\nS3 270 V2 [6,6]\nS4 270 V3 [4,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-207\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n- S5: V1=[0,0], V2=[1,0], V3=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-208.json b/voi/data/voi-208.json new file mode 100644 index 0000000000000000000000000000000000000000..0c9c3e3327469a05cc6d1c03d61b96a57766ec49 --- /dev/null +++ b/voi/data/voi-208.json @@ -0,0 +1,233 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 1, + 2 + ], + [ + 1, + 1 + ], + [ + 3, + 1 + ], + [ + 3, + 2 + ] + ] + }, + { + "polygon": [ + [ + 2, + 0 + ], + [ + 4, + 0 + ], + [ + 4, + 1 + ], + [ + 3, + 1 + ], + [ + 3, + 3 + ], + [ + 2, + 3 + ] + ] + }, + { + "polygon": [ + [ + 2, + 1 + ], + [ + 5, + 1 + ], + [ + 4, + 2 + ], + [ + 2, + 2 + ] + ] + } + ], + "meta": { + "seed": 4204009, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.234432, + "contourComplexity": 42, + "connectedComponents": 1, + "fillRatio": 0.102051, + "difficultyScore": 0.458169, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 209, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-208/target.png", + "shapes": { + "S1": "../images/voi-208/shape_S1.png", + "S2": "../images/voi-208/shape_S2.png", + "S3": "../images/voi-208/shape_S3.png", + "S4": "../images/voi-208/shape_S4.png", + "S5": "../images/voi-208/shape_S5.png" + } + }, + "ID": "voi-208", + "answer": { + "placements": [ + { + "shape": "S3", + "angle": 90, + "vertex": "V4", + "grid": [ + 3, + 2 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V3", + "grid": [ + 4, + 1 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V2", + "grid": [ + 5, + 1 + ] + } + ] + }, + "legacy_answer": "S3 90 V4 [3,2]\nS4 0 V3 [4,1]\nS5 0 V2 [5,1]", + "solutionText": "S3 90 V4 [3,2]\nS4 0 V3 [4,1]\nS5 0 V2 [5,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-208\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[1,0], V3=[0,1]\n- S3: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S5: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-209.json b/voi/data/voi-209.json new file mode 100644 index 0000000000000000000000000000000000000000..85f3bcbcab4711f27afad816e07157f0ac719196 --- /dev/null +++ b/voi/data/voi-209.json @@ -0,0 +1,221 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 8 + ], + [ + 2, + 8 + ] + ] + }, + { + "polygon": [ + [ + 2, + 3 + ], + [ + 1, + 3 + ], + [ + 1, + 2 + ], + [ + 2, + 2 + ] + ] + }, + { + "polygon": [ + [ + 1, + 5 + ], + [ + 1, + 2 + ], + [ + 3, + 2 + ], + [ + 3, + 5 + ] + ] + } + ], + "meta": { + "seed": 4204010, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "contourComplexity": 8, + "connectedComponents": 1, + "fillRatio": 0.125, + "difficultyScore": 0.55, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 210, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-209/target.png", + "shapes": { + "S1": "../images/voi-209/shape_S1.png", + "S2": "../images/voi-209/shape_S2.png", + "S3": "../images/voi-209/shape_S3.png", + "S4": "../images/voi-209/shape_S4.png", + "S5": "../images/voi-209/shape_S5.png" + } + }, + "ID": "voi-209", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 0, + "vertex": "V3", + "grid": [ + 3, + 8 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V4", + "grid": [ + 2, + 2 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V3", + "grid": [ + 3, + 2 + ] + } + ] + }, + "legacy_answer": "S2 0 V3 [3,8]\nS4 180 V4 [2,2]\nS5 90 V3 [3,2]", + "solutionText": "S2 0 V3 [3,8]\nS4 180 V4 [2,2]\nS5 90 V3 [3,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-209\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S3: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-210.json b/voi/data/voi-210.json new file mode 100644 index 0000000000000000000000000000000000000000..d00f22a6b20e775760a7f9b0f75e4bf71c10c828 --- /dev/null +++ b/voi/data/voi-210.json @@ -0,0 +1,233 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 7, + 8 + ], + [ + 4, + 8 + ], + [ + 4, + 6 + ], + [ + 7, + 6 + ] + ] + }, + { + "polygon": [ + [ + 5, + 4 + ], + [ + 6, + 4 + ], + [ + 6, + 6 + ], + [ + 5, + 6 + ] + ] + }, + { + "polygon": [ + [ + 4, + 6 + ], + [ + 4, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 5 + ], + [ + 7, + 5 + ], + [ + 7, + 6 + ] + ] + } + ], + "meta": { + "seed": 4204011, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.166667, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.620833, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 211, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-210/target.png", + "shapes": { + "S1": "../images/voi-210/shape_S1.png", + "S2": "../images/voi-210/shape_S2.png", + "S3": "../images/voi-210/shape_S3.png", + "S4": "../images/voi-210/shape_S4.png", + "S5": "../images/voi-210/shape_S5.png" + } + }, + "ID": "voi-210", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V4", + "grid": [ + 7, + 6 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V2", + "grid": [ + 6, + 4 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V6", + "grid": [ + 7, + 6 + ] + } + ] + }, + "legacy_answer": "S1 180 V4 [7,6]\nS3 0 V2 [6,4]\nS4 90 V6 [7,6]", + "solutionText": "S1 180 V4 [7,6]\nS3 0 V2 [6,4]\nS4 90 V6 [7,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-210\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S3: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S5: V1=[0,0], V2=[1,0], V3=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-211.json b/voi/data/voi-211.json new file mode 100644 index 0000000000000000000000000000000000000000..ff222e3f6092ff8cb15d7a05f05f6ea8faa926c8 --- /dev/null +++ b/voi/data/voi-211.json @@ -0,0 +1,245 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 0 + ], + [ + 5, + 0 + ], + [ + 4, + 1 + ], + [ + 2, + 1 + ] + ] + }, + { + "polygon": [ + [ + 3, + 1 + ], + [ + 3, + 2 + ], + [ + 1, + 2 + ], + [ + 1, + 1 + ] + ] + }, + { + "polygon": [ + [ + 3, + 2 + ], + [ + 3, + 0 + ], + [ + 4, + 0 + ], + [ + 4, + 1 + ], + [ + 6, + 1 + ], + [ + 6, + 2 + ] + ] + } + ], + "meta": { + "seed": 4204012, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.234432, + "contourComplexity": 42, + "connectedComponents": 1, + "fillRatio": 0.102051, + "difficultyScore": 0.458169, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 212, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-211/target.png", + "shapes": { + "S1": "../images/voi-211/shape_S1.png", + "S2": "../images/voi-211/shape_S2.png", + "S3": "../images/voi-211/shape_S3.png", + "S4": "../images/voi-211/shape_S4.png", + "S5": "../images/voi-211/shape_S5.png" + } + }, + "ID": "voi-211", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V4", + "grid": [ + 2, + 1 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V4", + "grid": [ + 1, + 1 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V3", + "grid": [ + 4, + 0 + ] + } + ] + }, + "legacy_answer": "S1 0 V4 [2,1]\nS2 270 V4 [1,1]\nS3 90 V3 [4,0]", + "solutionText": "S1 0 V4 [2,1]\nS2 270 V4 [1,1]\nS3 90 V3 [4,0]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-211\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S5: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-212.json b/voi/data/voi-212.json new file mode 100644 index 0000000000000000000000000000000000000000..bff3649fcb512d9f599a6a1877b72f86209559a5 --- /dev/null +++ b/voi/data/voi-212.json @@ -0,0 +1,233 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 0 + ], + [ + 3, + 3 + ], + [ + 2, + 2 + ], + [ + 2, + 0 + ] + ] + }, + { + "polygon": [ + [ + 5, + 0 + ], + [ + 5, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 0 + ] + ] + }, + { + "polygon": [ + [ + 3, + 0 + ], + [ + 5, + 0 + ], + [ + 5, + 1 + ], + [ + 4, + 1 + ], + [ + 4, + 3 + ], + [ + 3, + 3 + ] + ] + } + ], + "meta": { + "seed": 4204013, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.209836, + "contourComplexity": 36, + "connectedComponents": 1, + "fillRatio": 0.117676, + "difficultyScore": 0.525304, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 213, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-212/target.png", + "shapes": { + "S1": "../images/voi-212/shape_S1.png", + "S2": "../images/voi-212/shape_S2.png", + "S3": "../images/voi-212/shape_S3.png", + "S4": "../images/voi-212/shape_S4.png", + "S5": "../images/voi-212/shape_S5.png" + } + }, + "ID": "voi-212", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V1", + "grid": [ + 3, + 0 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V1", + "grid": [ + 5, + 0 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V6", + "grid": [ + 3, + 3 + ] + } + ] + }, + "legacy_answer": "S1 270 V1 [3,0]\nS2 270 V1 [5,0]\nS3 0 V6 [3,3]", + "solutionText": "S1 270 V1 [3,0]\nS2 270 V1 [5,0]\nS3 0 V6 [3,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-212\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[1,0], V3=[0,1]\n- S5: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-213.json b/voi/data/voi-213.json new file mode 100644 index 0000000000000000000000000000000000000000..63f6be74c70b5d221ef7b9b8a3b01670d126b48e --- /dev/null +++ b/voi/data/voi-213.json @@ -0,0 +1,237 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 4 + ], + [ + 6, + 7 + ], + [ + 4, + 7 + ], + [ + 4, + 4 + ] + ] + }, + { + "polygon": [ + [ + 3, + 4 + ], + [ + 3, + 6 + ], + [ + 1, + 6 + ], + [ + 1, + 4 + ] + ] + }, + { + "polygon": [ + [ + 3, + 7 + ], + [ + 3, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 6 + ], + [ + 6, + 6 + ], + [ + 6, + 7 + ] + ] + } + ], + "meta": { + "seed": 4204014, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "contourComplexity": 12, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.430357, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 214, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-213/target.png", + "shapes": { + "S1": "../images/voi-213/shape_S1.png", + "S2": "../images/voi-213/shape_S2.png", + "S3": "../images/voi-213/shape_S3.png", + "S4": "../images/voi-213/shape_S4.png", + "S5": "../images/voi-213/shape_S5.png" + } + }, + "ID": "voi-213", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 270, + "vertex": "V4", + "grid": [ + 4, + 4 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V3", + "grid": [ + 1, + 6 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V4", + "grid": [ + 4, + 6 + ] + } + ] + }, + "legacy_answer": "S2 270 V4 [4,4]\nS3 270 V3 [1,6]\nS5 90 V4 [4,6]", + "solutionText": "S2 270 V4 [4,4]\nS3 270 V3 [1,6]\nS5 90 V4 [4,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-213\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-214.json b/voi/data/voi-214.json new file mode 100644 index 0000000000000000000000000000000000000000..3463750aaaa525c907190dcd42d8153563d4c001 --- /dev/null +++ b/voi/data/voi-214.json @@ -0,0 +1,217 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 6 + ], + [ + 1, + 6 + ], + [ + 1, + 4 + ], + [ + 4, + 4 + ] + ] + }, + { + "polygon": [ + [ + 5, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 2 + ], + [ + 5, + 2 + ] + ] + }, + { + "polygon": [ + [ + 4, + 6 + ], + [ + 3, + 6 + ], + [ + 3, + 5 + ], + [ + 4, + 5 + ] + ] + } + ], + "meta": { + "seed": 4204015, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "contourComplexity": 8, + "connectedComponents": 1, + "fillRatio": 0.125, + "difficultyScore": 0.55, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 215, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-214/target.png", + "shapes": { + "S1": "../images/voi-214/shape_S1.png", + "S2": "../images/voi-214/shape_S2.png", + "S3": "../images/voi-214/shape_S3.png", + "S4": "../images/voi-214/shape_S4.png", + "S5": "../images/voi-214/shape_S5.png" + } + }, + "ID": "voi-214", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V4", + "grid": [ + 4, + 4 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V4", + "grid": [ + 5, + 2 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V1", + "grid": [ + 4, + 6 + ] + } + ] + }, + "legacy_answer": "S1 180 V4 [4,4]\nS3 180 V4 [5,2]\nS4 180 V1 [4,6]", + "solutionText": "S1 180 V4 [4,4]\nS3 180 V4 [5,2]\nS4 180 V1 [4,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-214\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[0,1]\n- S3: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S4: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S5: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-215.json b/voi/data/voi-215.json new file mode 100644 index 0000000000000000000000000000000000000000..424fc5516f4c756ecbdc45aa03d9f7059e2b2e7c --- /dev/null +++ b/voi/data/voi-215.json @@ -0,0 +1,213 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 3 + ], + [ + 3, + 5 + ], + [ + 1, + 3 + ] + ] + }, + { + "polygon": [ + [ + 3, + 4 + ], + [ + 3, + 3 + ], + [ + 5, + 3 + ], + [ + 5, + 4 + ] + ] + }, + { + "polygon": [ + [ + 3, + 6 + ], + [ + 1, + 6 + ], + [ + 1, + 4 + ], + [ + 3, + 4 + ] + ] + } + ], + "meta": { + "seed": 4204016, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.131783, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.109375, + "difficultyScore": 0.854118, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 216, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-215/target.png", + "shapes": { + "S1": "../images/voi-215/shape_S1.png", + "S2": "../images/voi-215/shape_S2.png", + "S3": "../images/voi-215/shape_S3.png", + "S4": "../images/voi-215/shape_S4.png", + "S5": "../images/voi-215/shape_S5.png" + } + }, + "ID": "voi-215", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 270, + "vertex": "V3", + "grid": [ + 1, + 3 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V4", + "grid": [ + 5, + 4 + ] + }, + { + "shape": "S5", + "angle": 180, + "vertex": "V2", + "grid": [ + 1, + 6 + ] + } + ] + }, + "legacy_answer": "S2 270 V3 [1,3]\nS4 90 V4 [5,4]\nS5 180 V2 [1,6]", + "solutionText": "S2 270 V3 [1,3]\nS4 90 V4 [5,4]\nS5 180 V2 [1,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-215\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S4: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-216.json b/voi/data/voi-216.json new file mode 100644 index 0000000000000000000000000000000000000000..28f248e4cd4b83ff55d204c94974e0427b7a6b4e --- /dev/null +++ b/voi/data/voi-216.json @@ -0,0 +1,217 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 5 + ], + [ + 3, + 3 + ], + [ + 5, + 3 + ], + [ + 5, + 5 + ] + ] + }, + { + "polygon": [ + [ + 4, + 3 + ], + [ + 4, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 2, + 8 + ], + [ + 2, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 8 + ] + ] + } + ], + "meta": { + "seed": 4204017, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.591477, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 217, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-216/target.png", + "shapes": { + "S1": "../images/voi-216/shape_S1.png", + "S2": "../images/voi-216/shape_S2.png", + "S3": "../images/voi-216/shape_S3.png", + "S4": "../images/voi-216/shape_S4.png", + "S5": "../images/voi-216/shape_S5.png" + } + }, + "ID": "voi-216", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V2", + "grid": [ + 3, + 3 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V1", + "grid": [ + 4, + 3 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V4", + "grid": [ + 4, + 8 + ] + } + ] + }, + "legacy_answer": "S1 90 V2 [3,3]\nS4 270 V1 [4,3]\nS5 90 V4 [4,8]", + "solutionText": "S1 90 V2 [3,3]\nS4 270 V1 [4,3]\nS5 90 V4 [4,8]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-216\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-217.json b/voi/data/voi-217.json new file mode 100644 index 0000000000000000000000000000000000000000..4c65591240e9a8a9f29dd98cadfb3e56c887b59e --- /dev/null +++ b/voi/data/voi-217.json @@ -0,0 +1,217 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 0, + 6 + ], + [ + 2, + 6 + ], + [ + 2, + 7 + ], + [ + 0, + 7 + ] + ] + }, + { + "polygon": [ + [ + 1, + 4 + ], + [ + 4, + 4 + ], + [ + 4, + 6 + ], + [ + 1, + 6 + ] + ] + }, + { + "polygon": [ + [ + 4, + 5 + ], + [ + 4, + 8 + ], + [ + 2, + 8 + ], + [ + 2, + 5 + ] + ] + } + ], + "meta": { + "seed": 4204018, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "contourComplexity": 12, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.430357, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 218, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-217/target.png", + "shapes": { + "S1": "../images/voi-217/shape_S1.png", + "S2": "../images/voi-217/shape_S2.png", + "S3": "../images/voi-217/shape_S3.png", + "S4": "../images/voi-217/shape_S4.png", + "S5": "../images/voi-217/shape_S5.png" + } + }, + "ID": "voi-217", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V1", + "grid": [ + 0, + 6 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V4", + "grid": [ + 1, + 6 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V3", + "grid": [ + 2, + 8 + ] + } + ] + }, + "legacy_answer": "S1 0 V1 [0,6]\nS2 0 V4 [1,6]\nS3 270 V3 [2,8]", + "solutionText": "S1 0 V1 [0,6]\nS2 0 V4 [1,6]\nS3 270 V3 [2,8]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-217\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S5: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-218.json b/voi/data/voi-218.json new file mode 100644 index 0000000000000000000000000000000000000000..7a9811afc9aa7b0fe172fe299a2095ca6af604df --- /dev/null +++ b/voi/data/voi-218.json @@ -0,0 +1,217 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 5 + ], + [ + 7, + 5 + ], + [ + 7, + 7 + ], + [ + 5, + 7 + ] + ] + }, + { + "polygon": [ + [ + 6, + 7 + ], + [ + 6, + 4 + ], + [ + 8, + 4 + ], + [ + 8, + 7 + ] + ] + }, + { + "polygon": [ + [ + 5, + 5 + ], + [ + 5, + 2 + ], + [ + 6, + 2 + ], + [ + 6, + 5 + ] + ] + } + ], + "meta": { + "seed": 4204019, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.307692, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.549519, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 219, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-218/target.png", + "shapes": { + "S1": "../images/voi-218/shape_S1.png", + "S2": "../images/voi-218/shape_S2.png", + "S3": "../images/voi-218/shape_S3.png", + "S4": "../images/voi-218/shape_S4.png", + "S5": "../images/voi-218/shape_S5.png" + } + }, + "ID": "voi-218", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 0, + "vertex": "V3", + "grid": [ + 7, + 7 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V3", + "grid": [ + 8, + 4 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V4", + "grid": [ + 6, + 5 + ] + } + ] + }, + "legacy_answer": "S2 0 V3 [7,7]\nS3 90 V3 [8,4]\nS5 90 V4 [6,5]", + "solutionText": "S2 0 V3 [7,7]\nS3 90 V3 [8,4]\nS5 90 V4 [6,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-218\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S5: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-219.json b/voi/data/voi-219.json new file mode 100644 index 0000000000000000000000000000000000000000..f06a462ba7d8137930327920b56b061e1970e34a --- /dev/null +++ b/voi/data/voi-219.json @@ -0,0 +1,221 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 5 + ], + [ + 4, + 8 + ], + [ + 3, + 7 + ], + [ + 3, + 5 + ] + ] + }, + { + "polygon": [ + [ + 0, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 6 + ], + [ + 0, + 6 + ] + ] + }, + { + "polygon": [ + [ + 1, + 6 + ], + [ + 4, + 6 + ], + [ + 4, + 8 + ], + [ + 1, + 8 + ] + ] + } + ], + "meta": { + "seed": 4204020, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.265583, + "contourComplexity": 38, + "connectedComponents": 1, + "fillRatio": 0.132324, + "difficultyScore": 0.397682, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 220, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-219/target.png", + "shapes": { + "S1": "../images/voi-219/shape_S1.png", + "S2": "../images/voi-219/shape_S2.png", + "S3": "../images/voi-219/shape_S3.png", + "S4": "../images/voi-219/shape_S4.png", + "S5": "../images/voi-219/shape_S5.png" + } + }, + "ID": "voi-219", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V1", + "grid": [ + 4, + 5 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V3", + "grid": [ + 3, + 6 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V4", + "grid": [ + 1, + 8 + ] + } + ] + }, + "legacy_answer": "S1 270 V1 [4,5]\nS2 0 V3 [3,6]\nS4 0 V4 [1,8]", + "solutionText": "S1 270 V1 [4,5]\nS2 0 V3 [3,6]\nS4 0 V4 [1,8]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-219\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S3: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-220.json b/voi/data/voi-220.json new file mode 100644 index 0000000000000000000000000000000000000000..27237ae8c0e197b5b3637ceeed96070e230e0815 --- /dev/null +++ b/voi/data/voi-220.json @@ -0,0 +1,221 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 2 + ], + [ + 7, + 2 + ], + [ + 7, + 4 + ], + [ + 4, + 4 + ] + ] + }, + { + "polygon": [ + [ + 5, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 2 + ], + [ + 5, + 2 + ] + ] + }, + { + "polygon": [ + [ + 1, + 3 + ], + [ + 4, + 3 + ], + [ + 3, + 4 + ], + [ + 1, + 4 + ] + ] + } + ], + "meta": { + "seed": 4204021, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.189911, + "contourComplexity": 42, + "connectedComponents": 1, + "fillRatio": 0.133301, + "difficultyScore": 0.573755, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 221, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-220/target.png", + "shapes": { + "S1": "../images/voi-220/shape_S1.png", + "S2": "../images/voi-220/shape_S2.png", + "S3": "../images/voi-220/shape_S3.png", + "S4": "../images/voi-220/shape_S4.png", + "S5": "../images/voi-220/shape_S5.png" + } + }, + "ID": "voi-220", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V1", + "grid": [ + 4, + 2 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V1", + "grid": [ + 5, + 3 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V2", + "grid": [ + 4, + 3 + ] + } + ] + }, + "legacy_answer": "S1 0 V1 [4,2]\nS2 180 V1 [5,3]\nS5 0 V2 [4,3]", + "solutionText": "S1 0 V1 [4,2]\nS2 180 V1 [5,3]\nS5 0 V2 [4,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-220\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S4: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S5: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-221.json b/voi/data/voi-221.json new file mode 100644 index 0000000000000000000000000000000000000000..a743ee80528b59877c3bff1f5f79c381fb46148f --- /dev/null +++ b/voi/data/voi-221.json @@ -0,0 +1,253 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 7, + 3 + ], + [ + 5, + 3 + ], + [ + 5, + 2 + ], + [ + 6, + 2 + ], + [ + 6, + 0 + ], + [ + 7, + 0 + ] + ] + }, + { + "polygon": [ + [ + 2, + 1 + ], + [ + 5, + 1 + ], + [ + 5, + 3 + ], + [ + 2, + 3 + ] + ] + }, + { + "polygon": [ + [ + 2, + 0 + ], + [ + 4, + 0 + ], + [ + 4, + 1 + ], + [ + 3, + 1 + ], + [ + 3, + 3 + ], + [ + 2, + 3 + ] + ] + } + ], + "meta": { + "seed": 4204022, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "contourComplexity": 12, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.430357, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 222, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-221/target.png", + "shapes": { + "S1": "../images/voi-221/shape_S1.png", + "S2": "../images/voi-221/shape_S2.png", + "S3": "../images/voi-221/shape_S3.png", + "S4": "../images/voi-221/shape_S4.png", + "S5": "../images/voi-221/shape_S5.png" + } + }, + "ID": "voi-221", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V3", + "grid": [ + 5, + 2 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V3", + "grid": [ + 5, + 3 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V4", + "grid": [ + 3, + 1 + ] + } + ] + }, + "legacy_answer": "S1 180 V3 [5,2]\nS2 0 V3 [5,3]\nS3 0 V4 [3,1]", + "solutionText": "S1 180 V3 [5,2]\nS2 0 V3 [5,3]\nS3 0 V4 [3,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-221\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S5: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-222.json b/voi/data/voi-222.json new file mode 100644 index 0000000000000000000000000000000000000000..c3d08138bc667b9fbbf989adc982bdddd8b651fb --- /dev/null +++ b/voi/data/voi-222.json @@ -0,0 +1,253 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 3 + ], + [ + 6, + 3 + ], + [ + 6, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 6 + ], + [ + 4, + 6 + ] + ] + }, + { + "polygon": [ + [ + 7, + 2 + ], + [ + 7, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 2 + ] + ] + }, + { + "polygon": [ + [ + 4, + 0 + ], + [ + 6, + 0 + ], + [ + 6, + 1 + ], + [ + 5, + 1 + ], + [ + 5, + 3 + ], + [ + 4, + 3 + ] + ] + } + ], + "meta": { + "seed": 4204023, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.166667, + "contourComplexity": 12, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.620833, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 223, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-222/target.png", + "shapes": { + "S1": "../images/voi-222/shape_S1.png", + "S2": "../images/voi-222/shape_S2.png", + "S3": "../images/voi-222/shape_S3.png", + "S4": "../images/voi-222/shape_S4.png", + "S5": "../images/voi-222/shape_S5.png" + } + }, + "ID": "voi-222", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V2", + "grid": [ + 6, + 3 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V1", + "grid": [ + 7, + 2 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V3", + "grid": [ + 6, + 1 + ] + } + ] + }, + "legacy_answer": "S1 0 V2 [6,3]\nS3 270 V1 [7,2]\nS4 0 V3 [6,1]", + "solutionText": "S1 0 V2 [6,3]\nS3 270 V1 [7,2]\nS4 0 V3 [6,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-222\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S2: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-223.json b/voi/data/voi-223.json new file mode 100644 index 0000000000000000000000000000000000000000..1bae562226cf1120cbf2016d45232b718f4a561d --- /dev/null +++ b/voi/data/voi-223.json @@ -0,0 +1,233 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 1, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 6 + ], + [ + 2, + 6 + ], + [ + 2, + 8 + ], + [ + 1, + 8 + ] + ] + }, + { + "polygon": [ + [ + 2, + 5 + ], + [ + 5, + 5 + ], + [ + 5, + 7 + ], + [ + 2, + 7 + ] + ] + }, + { + "polygon": [ + [ + 3, + 8 + ], + [ + 1, + 8 + ], + [ + 1, + 7 + ], + [ + 3, + 7 + ] + ] + } + ], + "meta": { + "seed": 4204024, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.333333, + "contourComplexity": 12, + "connectedComponents": 1, + "fillRatio": 0.125, + "difficultyScore": 0.683333, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 224, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-223/target.png", + "shapes": { + "S1": "../images/voi-223/shape_S1.png", + "S2": "../images/voi-223/shape_S2.png", + "S3": "../images/voi-223/shape_S3.png", + "S4": "../images/voi-223/shape_S4.png", + "S5": "../images/voi-223/shape_S5.png" + } + }, + "ID": "voi-223", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V4", + "grid": [ + 2, + 6 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V4", + "grid": [ + 2, + 7 + ] + }, + { + "shape": "S5", + "angle": 180, + "vertex": "V4", + "grid": [ + 3, + 7 + ] + } + ] + }, + "legacy_answer": "S1 0 V4 [2,6]\nS3 0 V4 [2,7]\nS5 180 V4 [3,7]", + "solutionText": "S1 0 V4 [2,6]\nS3 0 V4 [2,7]\nS5 180 V4 [3,7]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-223\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-224.json b/voi/data/voi-224.json new file mode 100644 index 0000000000000000000000000000000000000000..8fe9af8bd0a347983d0cda928a5e229ec9996694 --- /dev/null +++ b/voi/data/voi-224.json @@ -0,0 +1,221 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 5 + ], + [ + 7, + 5 + ], + [ + 6, + 6 + ], + [ + 4, + 6 + ] + ] + }, + { + "polygon": [ + [ + 8, + 7 + ], + [ + 5, + 7 + ], + [ + 5, + 5 + ], + [ + 8, + 5 + ] + ] + }, + { + "polygon": [ + [ + 4, + 8 + ], + [ + 4, + 6 + ], + [ + 5, + 6 + ], + [ + 5, + 8 + ] + ] + } + ], + "meta": { + "seed": 4204025, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.290801, + "contourComplexity": 40, + "connectedComponents": 1, + "fillRatio": 0.116699, + "difficultyScore": 0.529806, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 225, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-224/target.png", + "shapes": { + "S1": "../images/voi-224/shape_S1.png", + "S2": "../images/voi-224/shape_S2.png", + "S3": "../images/voi-224/shape_S3.png", + "S4": "../images/voi-224/shape_S4.png", + "S5": "../images/voi-224/shape_S5.png" + } + }, + "ID": "voi-224", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V1", + "grid": [ + 4, + 5 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V1", + "grid": [ + 8, + 7 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V2", + "grid": [ + 4, + 6 + ] + } + ] + }, + "legacy_answer": "S1 0 V1 [4,5]\nS4 180 V1 [8,7]\nS5 90 V2 [4,6]", + "solutionText": "S1 0 V1 [4,5]\nS4 180 V1 [8,7]\nS5 90 V2 [4,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-224\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-225.json b/voi/data/voi-225.json new file mode 100644 index 0000000000000000000000000000000000000000..1d97da997f08067296672f8761a6bb23277c0eb4 --- /dev/null +++ b/voi/data/voi-225.json @@ -0,0 +1,225 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 7 + ], + [ + 4, + 5 + ], + [ + 5, + 5 + ], + [ + 5, + 7 + ] + ] + }, + { + "polygon": [ + [ + 3, + 4 + ], + [ + 3, + 7 + ], + [ + 1, + 7 + ], + [ + 1, + 4 + ] + ] + }, + { + "polygon": [ + [ + 3, + 8 + ], + [ + 3, + 5 + ], + [ + 5, + 5 + ], + [ + 5, + 8 + ] + ] + } + ], + "meta": { + "seed": 4204026, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.430357, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 226, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-225/target.png", + "shapes": { + "S1": "../images/voi-225/shape_S1.png", + "S2": "../images/voi-225/shape_S2.png", + "S3": "../images/voi-225/shape_S3.png", + "S4": "../images/voi-225/shape_S4.png", + "S5": "../images/voi-225/shape_S5.png" + } + }, + "ID": "voi-225", + "answer": { + "placements": [ + { + "shape": "S3", + "angle": 90, + "vertex": "V3", + "grid": [ + 5, + 5 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V2", + "grid": [ + 3, + 7 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V4", + "grid": [ + 5, + 8 + ] + } + ] + }, + "legacy_answer": "S3 90 V3 [5,5]\nS4 270 V2 [3,7]\nS5 90 V4 [5,8]", + "solutionText": "S3 90 V3 [5,5]\nS4 270 V2 [3,7]\nS5 90 V4 [5,8]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-225\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-226.json b/voi/data/voi-226.json new file mode 100644 index 0000000000000000000000000000000000000000..2f6f41f346819b10eb3d7e115499053bdb344d89 --- /dev/null +++ b/voi/data/voi-226.json @@ -0,0 +1,229 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 4 + ], + [ + 1, + 4 + ], + [ + 1, + 2 + ], + [ + 4, + 2 + ] + ] + }, + { + "polygon": [ + [ + 2, + 4 + ], + [ + 2, + 7 + ], + [ + 0, + 7 + ], + [ + 0, + 4 + ] + ] + }, + { + "polygon": [ + [ + 2, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 5 + ], + [ + 2, + 5 + ] + ] + } + ], + "meta": { + "seed": 4204027, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.25, + "contourComplexity": 12, + "connectedComponents": 1, + "fillRatio": 0.1875, + "difficultyScore": 0.225, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 227, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-226/target.png", + "shapes": { + "S1": "../images/voi-226/shape_S1.png", + "S2": "../images/voi-226/shape_S2.png", + "S3": "../images/voi-226/shape_S3.png", + "S4": "../images/voi-226/shape_S4.png", + "S5": "../images/voi-226/shape_S5.png" + } + }, + "ID": "voi-226", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V3", + "grid": [ + 1, + 2 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V2", + "grid": [ + 2, + 7 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V2", + "grid": [ + 4, + 3 + ] + } + ] + }, + "legacy_answer": "S1 180 V3 [1,2]\nS3 270 V2 [2,7]\nS5 0 V2 [4,3]", + "solutionText": "S1 180 V3 [1,2]\nS3 270 V2 [2,7]\nS5 0 V2 [4,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-226\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S5: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-227.json b/voi/data/voi-227.json new file mode 100644 index 0000000000000000000000000000000000000000..ceaa2d508178cc45abbb619b4a91fa7185a29ab0 --- /dev/null +++ b/voi/data/voi-227.json @@ -0,0 +1,253 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 5 + ], + [ + 4, + 7 + ], + [ + 3, + 7 + ], + [ + 3, + 6 + ], + [ + 1, + 6 + ], + [ + 1, + 5 + ] + ] + }, + { + "polygon": [ + [ + 3, + 4 + ], + [ + 3, + 6 + ], + [ + 2, + 6 + ], + [ + 2, + 5 + ], + [ + 0, + 5 + ], + [ + 0, + 4 + ] + ] + }, + { + "polygon": [ + [ + 4, + 2 + ], + [ + 4, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 2 + ] + ] + } + ], + "meta": { + "seed": 4204028, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "contourComplexity": 12, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.591477, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 228, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-227/target.png", + "shapes": { + "S1": "../images/voi-227/shape_S1.png", + "S2": "../images/voi-227/shape_S2.png", + "S3": "../images/voi-227/shape_S3.png", + "S4": "../images/voi-227/shape_S4.png", + "S5": "../images/voi-227/shape_S5.png" + } + }, + "ID": "voi-227", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V1", + "grid": [ + 4, + 5 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V3", + "grid": [ + 2, + 6 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V2", + "grid": [ + 4, + 5 + ] + } + ] + }, + "legacy_answer": "S1 270 V1 [4,5]\nS2 270 V3 [2,6]\nS4 270 V2 [4,5]", + "solutionText": "S1 270 V1 [4,5]\nS2 270 V3 [2,6]\nS4 270 V2 [4,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-227\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S5: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-228.json b/voi/data/voi-228.json new file mode 100644 index 0000000000000000000000000000000000000000..0622a7be60e1025e5e9393839cd8efef64c1e041 --- /dev/null +++ b/voi/data/voi-228.json @@ -0,0 +1,245 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 3 + ], + [ + 4, + 2 + ], + [ + 5, + 2 + ], + [ + 5, + 3 + ] + ] + }, + { + "polygon": [ + [ + 5, + 1 + ], + [ + 5, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 1 + ] + ] + }, + { + "polygon": [ + [ + 1, + 1 + ], + [ + 3, + 1 + ], + [ + 3, + 2 + ], + [ + 2, + 2 + ], + [ + 2, + 4 + ], + [ + 1, + 4 + ] + ] + } + ], + "meta": { + "seed": 4204029, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "contourComplexity": 12, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.591477, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 229, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-228/target.png", + "shapes": { + "S1": "../images/voi-228/shape_S1.png", + "S2": "../images/voi-228/shape_S2.png", + "S3": "../images/voi-228/shape_S3.png", + "S4": "../images/voi-228/shape_S4.png", + "S5": "../images/voi-228/shape_S5.png" + } + }, + "ID": "voi-228", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V2", + "grid": [ + 4, + 2 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V4", + "grid": [ + 3, + 1 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V1", + "grid": [ + 1, + 1 + ] + } + ] + }, + "legacy_answer": "S1 90 V2 [4,2]\nS4 270 V4 [3,1]\nS5 0 V1 [1,1]", + "solutionText": "S1 90 V2 [4,2]\nS4 270 V4 [3,1]\nS5 0 V1 [1,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-228\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-229.json b/voi/data/voi-229.json new file mode 100644 index 0000000000000000000000000000000000000000..fb2fde69d3589b92baafd500243fabc0fa0c52ce --- /dev/null +++ b/voi/data/voi-229.json @@ -0,0 +1,253 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 6 + ], + [ + 6, + 8 + ], + [ + 5, + 8 + ], + [ + 5, + 7 + ], + [ + 3, + 7 + ], + [ + 3, + 6 + ] + ] + }, + { + "polygon": [ + [ + 5, + 3 + ], + [ + 5, + 6 + ], + [ + 3, + 6 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 6, + 8 + ], + [ + 4, + 8 + ], + [ + 4, + 7 + ], + [ + 5, + 7 + ], + [ + 5, + 5 + ], + [ + 6, + 5 + ] + ] + } + ], + "meta": { + "seed": 4204030, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.430357, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 230, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-229/target.png", + "shapes": { + "S1": "../images/voi-229/shape_S1.png", + "S2": "../images/voi-229/shape_S2.png", + "S3": "../images/voi-229/shape_S3.png", + "S4": "../images/voi-229/shape_S4.png", + "S5": "../images/voi-229/shape_S5.png" + } + }, + "ID": "voi-229", + "answer": { + "placements": [ + { + "shape": "S3", + "angle": 270, + "vertex": "V2", + "grid": [ + 6, + 8 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V2", + "grid": [ + 5, + 6 + ] + }, + { + "shape": "S5", + "angle": 180, + "vertex": "V4", + "grid": [ + 5, + 7 + ] + } + ] + }, + "legacy_answer": "S3 270 V2 [6,8]\nS4 270 V2 [5,6]\nS5 180 V4 [5,7]", + "solutionText": "S3 270 V2 [6,8]\nS4 270 V2 [5,6]\nS5 180 V4 [5,7]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-229\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S2: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-230.json b/voi/data/voi-230.json new file mode 100644 index 0000000000000000000000000000000000000000..477e45b57177622e85c20731c01ed02490975787 --- /dev/null +++ b/voi/data/voi-230.json @@ -0,0 +1,237 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 8 + ], + [ + 5, + 5 + ], + [ + 7, + 5 + ], + [ + 7, + 8 + ] + ] + }, + { + "polygon": [ + [ + 5, + 7 + ], + [ + 3, + 7 + ], + [ + 3, + 6 + ], + [ + 4, + 6 + ], + [ + 4, + 4 + ], + [ + 5, + 4 + ] + ] + }, + { + "polygon": [ + [ + 6, + 7 + ], + [ + 6, + 8 + ], + [ + 5, + 8 + ], + [ + 5, + 7 + ] + ] + } + ], + "meta": { + "seed": 4204031, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.591477, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 231, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-230/target.png", + "shapes": { + "S1": "../images/voi-230/shape_S1.png", + "S2": "../images/voi-230/shape_S2.png", + "S3": "../images/voi-230/shape_S3.png", + "S4": "../images/voi-230/shape_S4.png", + "S5": "../images/voi-230/shape_S5.png" + } + }, + "ID": "voi-230", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V4", + "grid": [ + 7, + 8 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V5", + "grid": [ + 4, + 4 + ] + }, + { + "shape": "S5", + "angle": 270, + "vertex": "V2", + "grid": [ + 6, + 8 + ] + } + ] + }, + "legacy_answer": "S1 90 V4 [7,8]\nS3 180 V5 [4,4]\nS5 270 V2 [6,8]", + "solutionText": "S1 90 V4 [7,8]\nS3 180 V5 [4,4]\nS5 270 V2 [6,8]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-230\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S5: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-231.json b/voi/data/voi-231.json new file mode 100644 index 0000000000000000000000000000000000000000..e49ad0ef13578e9697fac8c7fc2d8c3c303f7ec2 --- /dev/null +++ b/voi/data/voi-231.json @@ -0,0 +1,229 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 3 + ], + [ + 6, + 3 + ] + ] + }, + { + "polygon": [ + [ + 4, + 4 + ], + [ + 4, + 1 + ], + [ + 6, + 1 + ], + [ + 6, + 4 + ] + ] + }, + { + "polygon": [ + [ + 6, + 6 + ], + [ + 5, + 6 + ], + [ + 5, + 3 + ], + [ + 6, + 3 + ] + ] + } + ], + "meta": { + "seed": 4204032, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "contourComplexity": 6, + "connectedComponents": 1, + "fillRatio": 0.125, + "difficultyScore": 0.55, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 232, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-231/target.png", + "shapes": { + "S1": "../images/voi-231/shape_S1.png", + "S2": "../images/voi-231/shape_S2.png", + "S3": "../images/voi-231/shape_S3.png", + "S4": "../images/voi-231/shape_S4.png", + "S5": "../images/voi-231/shape_S5.png" + } + }, + "ID": "voi-231", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 180, + "vertex": "V2", + "grid": [ + 5, + 4 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V3", + "grid": [ + 6, + 1 + ] + }, + { + "shape": "S5", + "angle": 180, + "vertex": "V1", + "grid": [ + 6, + 6 + ] + } + ] + }, + "legacy_answer": "S2 180 V2 [5,4]\nS4 90 V3 [6,1]\nS5 180 V1 [6,6]", + "solutionText": "S2 180 V2 [5,4]\nS4 90 V3 [6,1]\nS5 180 V1 [6,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-231\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S2: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-232.json b/voi/data/voi-232.json new file mode 100644 index 0000000000000000000000000000000000000000..9a4e6b1f6f997f4ef872d241871bcdf385c7a1a3 --- /dev/null +++ b/voi/data/voi-232.json @@ -0,0 +1,225 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 3 + ], + [ + 7, + 3 + ], + [ + 7, + 4 + ], + [ + 4, + 4 + ] + ] + }, + { + "polygon": [ + [ + 6, + 7 + ], + [ + 6, + 4 + ], + [ + 7, + 5 + ], + [ + 7, + 7 + ] + ] + }, + { + "polygon": [ + [ + 4, + 6 + ], + [ + 4, + 3 + ], + [ + 6, + 3 + ], + [ + 6, + 6 + ] + ] + } + ], + "meta": { + "seed": 4204033, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.346883, + "contourComplexity": 40, + "connectedComponents": 1, + "fillRatio": 0.117676, + "difficultyScore": 0.752182, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 233, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-232/target.png", + "shapes": { + "S1": "../images/voi-232/shape_S1.png", + "S2": "../images/voi-232/shape_S2.png", + "S3": "../images/voi-232/shape_S3.png", + "S4": "../images/voi-232/shape_S4.png", + "S5": "../images/voi-232/shape_S5.png" + } + }, + "ID": "voi-232", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V2", + "grid": [ + 7, + 3 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V3", + "grid": [ + 7, + 5 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V1", + "grid": [ + 4, + 6 + ] + } + ] + }, + "legacy_answer": "S1 0 V2 [7,3]\nS2 90 V3 [7,5]\nS3 90 V1 [4,6]", + "solutionText": "S1 0 V2 [7,3]\nS2 90 V3 [7,5]\nS3 90 V1 [4,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-232\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-233.json b/voi/data/voi-233.json new file mode 100644 index 0000000000000000000000000000000000000000..88d0d684439aadd6066b90a0ef20b34d87283859 --- /dev/null +++ b/voi/data/voi-233.json @@ -0,0 +1,221 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 5 + ], + [ + 6, + 5 + ], + [ + 6, + 7 + ], + [ + 3, + 7 + ] + ] + }, + { + "polygon": [ + [ + 6, + 7 + ], + [ + 4, + 7 + ], + [ + 4, + 6 + ], + [ + 6, + 6 + ] + ] + }, + { + "polygon": [ + [ + 8, + 3 + ], + [ + 8, + 6 + ], + [ + 6, + 6 + ], + [ + 6, + 3 + ] + ] + } + ], + "meta": { + "seed": 4204034, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "contourComplexity": 8, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.430357, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 234, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-233/target.png", + "shapes": { + "S1": "../images/voi-233/shape_S1.png", + "S2": "../images/voi-233/shape_S2.png", + "S3": "../images/voi-233/shape_S3.png", + "S4": "../images/voi-233/shape_S4.png", + "S5": "../images/voi-233/shape_S5.png" + } + }, + "ID": "voi-233", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V4", + "grid": [ + 3, + 7 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V2", + "grid": [ + 4, + 7 + ] + }, + { + "shape": "S5", + "angle": 270, + "vertex": "V1", + "grid": [ + 8, + 3 + ] + } + ] + }, + "legacy_answer": "S1 0 V4 [3,7]\nS3 180 V2 [4,7]\nS5 270 V1 [8,3]", + "solutionText": "S1 0 V4 [3,7]\nS3 180 V2 [4,7]\nS5 270 V1 [8,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-233\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-234.json b/voi/data/voi-234.json new file mode 100644 index 0000000000000000000000000000000000000000..a0e0ff6d77c99a678a29ce6637c972172fbb1c5a --- /dev/null +++ b/voi/data/voi-234.json @@ -0,0 +1,245 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 5 + ], + [ + 7, + 5 + ], + [ + 7, + 7 + ], + [ + 5, + 7 + ] + ] + }, + { + "polygon": [ + [ + 2, + 5 + ], + [ + 5, + 5 + ], + [ + 5, + 6 + ], + [ + 2, + 6 + ] + ] + }, + { + "polygon": [ + [ + 2, + 7 + ], + [ + 2, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 6 + ], + [ + 5, + 6 + ], + [ + 5, + 7 + ] + ] + } + ], + "meta": { + "seed": 4204035, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "contourComplexity": 6, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.591477, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 235, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-234/target.png", + "shapes": { + "S1": "../images/voi-234/shape_S1.png", + "S2": "../images/voi-234/shape_S2.png", + "S3": "../images/voi-234/shape_S3.png", + "S4": "../images/voi-234/shape_S4.png", + "S5": "../images/voi-234/shape_S5.png" + } + }, + "ID": "voi-234", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V2", + "grid": [ + 7, + 5 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V4", + "grid": [ + 2, + 6 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V4", + "grid": [ + 3, + 6 + ] + } + ] + }, + "legacy_answer": "S1 0 V2 [7,5]\nS2 0 V4 [2,6]\nS3 90 V4 [3,6]", + "solutionText": "S1 0 V2 [7,5]\nS2 0 V4 [2,6]\nS3 90 V4 [3,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-234\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-235.json b/voi/data/voi-235.json new file mode 100644 index 0000000000000000000000000000000000000000..16d00d9f7c3e7136745057ca28d7b8844005b2a9 --- /dev/null +++ b/voi/data/voi-235.json @@ -0,0 +1,229 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 1, + 7 + ], + [ + 1, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 7 + ] + ] + }, + { + "polygon": [ + [ + 0, + 6 + ], + [ + 1, + 6 + ], + [ + 1, + 7 + ], + [ + 0, + 7 + ] + ] + }, + { + "polygon": [ + [ + 2, + 5 + ], + [ + 2, + 6 + ], + [ + 0, + 6 + ], + [ + 0, + 5 + ] + ] + } + ], + "meta": { + "seed": 4204036, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "contourComplexity": 11, + "connectedComponents": 1, + "fillRatio": 0.109375, + "difficultyScore": 0.492361, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 236, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-235/target.png", + "shapes": { + "S1": "../images/voi-235/shape_S1.png", + "S2": "../images/voi-235/shape_S2.png", + "S3": "../images/voi-235/shape_S3.png", + "S4": "../images/voi-235/shape_S4.png", + "S5": "../images/voi-235/shape_S5.png" + } + }, + "ID": "voi-235", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 90, + "vertex": "V3", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V1", + "grid": [ + 0, + 6 + ] + }, + { + "shape": "S5", + "angle": 270, + "vertex": "V1", + "grid": [ + 2, + 5 + ] + } + ] + }, + "legacy_answer": "S2 90 V3 [3,4]\nS4 0 V1 [0,6]\nS5 270 V1 [2,5]", + "solutionText": "S2 90 V3 [3,4]\nS4 0 V1 [0,6]\nS5 270 V1 [2,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-235\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S4: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S5: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-236.json b/voi/data/voi-236.json new file mode 100644 index 0000000000000000000000000000000000000000..25de2da457b0e2ea68272c084179c4e49850281e --- /dev/null +++ b/voi/data/voi-236.json @@ -0,0 +1,229 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 3 + ], + [ + 5, + 3 + ], + [ + 5, + 2 + ], + [ + 6, + 2 + ] + ] + }, + { + "polygon": [ + [ + 7, + 1 + ], + [ + 7, + 2 + ], + [ + 4, + 2 + ], + [ + 4, + 1 + ] + ] + }, + { + "polygon": [ + [ + 5, + 5 + ], + [ + 5, + 2 + ], + [ + 7, + 2 + ], + [ + 7, + 5 + ] + ] + } + ], + "meta": { + "seed": 4204037, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "contourComplexity": 8, + "connectedComponents": 1, + "fillRatio": 0.125, + "difficultyScore": 0.55, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 237, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-236/target.png", + "shapes": { + "S1": "../images/voi-236/shape_S1.png", + "S2": "../images/voi-236/shape_S2.png", + "S3": "../images/voi-236/shape_S3.png", + "S4": "../images/voi-236/shape_S4.png", + "S5": "../images/voi-236/shape_S5.png" + } + }, + "ID": "voi-236", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V3", + "grid": [ + 5, + 2 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V2", + "grid": [ + 7, + 2 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V1", + "grid": [ + 5, + 5 + ] + } + ] + }, + "legacy_answer": "S1 180 V3 [5,2]\nS3 270 V2 [7,2]\nS5 90 V1 [5,5]", + "solutionText": "S1 180 V3 [5,2]\nS3 270 V2 [7,2]\nS5 90 V1 [5,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-236\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S3: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-237.json b/voi/data/voi-237.json new file mode 100644 index 0000000000000000000000000000000000000000..9e632204814d930a0fe1fc75300b3aa74cc63e65 --- /dev/null +++ b/voi/data/voi-237.json @@ -0,0 +1,221 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 4 + ], + [ + 3, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 4 + ] + ] + }, + { + "polygon": [ + [ + 7, + 3 + ], + [ + 7, + 6 + ], + [ + 6, + 5 + ], + [ + 6, + 3 + ] + ] + }, + { + "polygon": [ + [ + 3, + 3 + ], + [ + 6, + 3 + ], + [ + 6, + 5 + ], + [ + 3, + 5 + ] + ] + } + ], + "meta": { + "seed": 4204038, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.209836, + "contourComplexity": 38, + "connectedComponents": 1, + "fillRatio": 0.117676, + "difficultyScore": 0.525304, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 238, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-237/target.png", + "shapes": { + "S1": "../images/voi-237/shape_S1.png", + "S2": "../images/voi-237/shape_S2.png", + "S3": "../images/voi-237/shape_S3.png", + "S4": "../images/voi-237/shape_S4.png", + "S5": "../images/voi-237/shape_S5.png" + } + }, + "ID": "voi-237", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V4", + "grid": [ + 4, + 4 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V2", + "grid": [ + 7, + 6 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V3", + "grid": [ + 6, + 5 + ] + } + ] + }, + "legacy_answer": "S1 90 V4 [4,4]\nS2 270 V2 [7,6]\nS3 0 V3 [6,5]", + "solutionText": "S1 90 V4 [4,4]\nS2 270 V2 [7,6]\nS3 0 V3 [6,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-237\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-238.json b/voi/data/voi-238.json new file mode 100644 index 0000000000000000000000000000000000000000..721e8fbb87228ddb94822c04c0502446df6d551b --- /dev/null +++ b/voi/data/voi-238.json @@ -0,0 +1,221 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 2 + ], + [ + 3, + 2 + ], + [ + 3, + 1 + ], + [ + 5, + 1 + ] + ] + }, + { + "polygon": [ + [ + 0, + 0 + ], + [ + 3, + 0 + ], + [ + 3, + 2 + ], + [ + 0, + 2 + ] + ] + }, + { + "polygon": [ + [ + 0, + 2 + ], + [ + 0, + 1 + ], + [ + 1, + 1 + ], + [ + 1, + 2 + ] + ] + } + ], + "meta": { + "seed": 4204039, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "contourComplexity": 8, + "connectedComponents": 1, + "fillRatio": 0.109375, + "difficultyScore": 0.492361, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 239, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-238/target.png", + "shapes": { + "S1": "../images/voi-238/shape_S1.png", + "S2": "../images/voi-238/shape_S2.png", + "S3": "../images/voi-238/shape_S3.png", + "S4": "../images/voi-238/shape_S4.png", + "S5": "../images/voi-238/shape_S5.png" + } + }, + "ID": "voi-238", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V3", + "grid": [ + 3, + 1 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V3", + "grid": [ + 3, + 2 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V3", + "grid": [ + 1, + 1 + ] + } + ] + }, + "legacy_answer": "S1 180 V3 [3,1]\nS2 0 V3 [3,2]\nS5 90 V3 [1,1]", + "solutionText": "S1 180 V3 [3,1]\nS2 0 V3 [3,2]\nS5 90 V3 [1,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-238\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S4: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S5: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-239.json b/voi/data/voi-239.json new file mode 100644 index 0000000000000000000000000000000000000000..cbbc65a84dbd43f8ae652ffdd3dd5feb0da51cec --- /dev/null +++ b/voi/data/voi-239.json @@ -0,0 +1,229 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 6 + ], + [ + 1, + 6 + ], + [ + 1, + 3 + ], + [ + 2, + 3 + ] + ] + }, + { + "polygon": [ + [ + 2, + 5 + ], + [ + 2, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 5 + ] + ] + }, + { + "polygon": [ + [ + 2, + 3 + ], + [ + 2, + 4 + ], + [ + 1, + 3 + ] + ] + } + ], + "meta": { + "seed": 4204040, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.141079, + "contourComplexity": 40, + "connectedComponents": 1, + "fillRatio": 0.101074, + "difficultyScore": 0.833536, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 240, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-239/target.png", + "shapes": { + "S1": "../images/voi-239/shape_S1.png", + "S2": "../images/voi-239/shape_S2.png", + "S3": "../images/voi-239/shape_S3.png", + "S4": "../images/voi-239/shape_S4.png", + "S5": "../images/voi-239/shape_S5.png" + } + }, + "ID": "voi-239", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 180, + "vertex": "V4", + "grid": [ + 2, + 3 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V6", + "grid": [ + 5, + 5 + ] + }, + { + "shape": "S5", + "angle": 270, + "vertex": "V1", + "grid": [ + 2, + 3 + ] + } + ] + }, + "legacy_answer": "S2 180 V4 [2,3]\nS4 90 V6 [5,5]\nS5 270 V1 [2,3]", + "solutionText": "S2 180 V4 [2,3]\nS4 90 V6 [5,5]\nS5 270 V1 [2,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-239\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S3: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S5: V1=[0,0], V2=[1,0], V3=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-240.json b/voi/data/voi-240.json new file mode 100644 index 0000000000000000000000000000000000000000..e330c5b76b052606ec8e59c2c44fcb6256df2cc8 --- /dev/null +++ b/voi/data/voi-240.json @@ -0,0 +1,237 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 0, + 4 + ], + [ + 1, + 4 + ], + [ + 1, + 5 + ], + [ + 0, + 5 + ] + ] + }, + { + "polygon": [ + [ + 3, + 7 + ], + [ + 1, + 7 + ], + [ + 1, + 6 + ], + [ + 2, + 6 + ], + [ + 2, + 4 + ], + [ + 3, + 4 + ] + ] + }, + { + "polygon": [ + [ + 0, + 6 + ], + [ + 0, + 4 + ], + [ + 2, + 4 + ], + [ + 2, + 6 + ] + ] + } + ], + "meta": { + "seed": 4204041, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "contourComplexity": 8, + "connectedComponents": 1, + "fillRatio": 0.109375, + "difficultyScore": 0.492361, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 241, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-240/target.png", + "shapes": { + "S1": "../images/voi-240/shape_S1.png", + "S2": "../images/voi-240/shape_S2.png", + "S3": "../images/voi-240/shape_S3.png", + "S4": "../images/voi-240/shape_S4.png", + "S5": "../images/voi-240/shape_S5.png" + } + }, + "ID": "voi-240", + "answer": { + "placements": [ + { + "shape": "S3", + "angle": 0, + "vertex": "V4", + "grid": [ + 0, + 5 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V2", + "grid": [ + 1, + 7 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V3", + "grid": [ + 2, + 4 + ] + } + ] + }, + "legacy_answer": "S3 0 V4 [0,5]\nS4 180 V2 [1,7]\nS5 90 V3 [2,4]", + "solutionText": "S3 0 V4 [0,5]\nS4 180 V2 [1,7]\nS5 90 V3 [2,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-240\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S3: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S5: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-241.json b/voi/data/voi-241.json new file mode 100644 index 0000000000000000000000000000000000000000..da3b8b8dabbf0d152a355b953d1d71989e129dce --- /dev/null +++ b/voi/data/voi-241.json @@ -0,0 +1,209 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 2 + ], + [ + 4, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 2 + ] + ] + }, + { + "polygon": [ + [ + 6, + 1 + ], + [ + 6, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 1 + ] + ] + }, + { + "polygon": [ + [ + 4, + 1 + ], + [ + 5, + 1 + ], + [ + 4, + 2 + ] + ] + } + ], + "meta": { + "seed": 4204042, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.141079, + "contourComplexity": 38, + "connectedComponents": 1, + "fillRatio": 0.101074, + "difficultyScore": 0.833536, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 242, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-241/target.png", + "shapes": { + "S1": "../images/voi-241/shape_S1.png", + "S2": "../images/voi-241/shape_S2.png", + "S3": "../images/voi-241/shape_S3.png", + "S4": "../images/voi-241/shape_S4.png", + "S5": "../images/voi-241/shape_S5.png" + } + }, + "ID": "voi-241", + "answer": { + "placements": [ + { + "shape": "S3", + "angle": 270, + "vertex": "V3", + "grid": [ + 3, + 5 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V3", + "grid": [ + 4, + 3 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V3", + "grid": [ + 4, + 2 + ] + } + ] + }, + "legacy_answer": "S3 270 V3 [3,5]\nS4 270 V3 [4,3]\nS5 0 V3 [4,2]", + "solutionText": "S3 270 V3 [3,5]\nS4 270 V3 [4,3]\nS5 0 V3 [4,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-241\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S5: V1=[0,0], V2=[1,0], V3=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-242.json b/voi/data/voi-242.json new file mode 100644 index 0000000000000000000000000000000000000000..98200464df3c2357ea96b2a452f3e12c17228679 --- /dev/null +++ b/voi/data/voi-242.json @@ -0,0 +1,221 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 1, + 0 + ], + [ + 4, + 0 + ], + [ + 4, + 2 + ], + [ + 1, + 2 + ] + ] + }, + { + "polygon": [ + [ + 6, + 1 + ], + [ + 6, + 2 + ], + [ + 4, + 2 + ], + [ + 4, + 1 + ] + ] + }, + { + "polygon": [ + [ + 6, + 1 + ], + [ + 3, + 1 + ], + [ + 3, + 0 + ], + [ + 6, + 0 + ] + ] + } + ], + "meta": { + "seed": 4204043, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "contourComplexity": 8, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.591477, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 243, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-242/target.png", + "shapes": { + "S1": "../images/voi-242/shape_S1.png", + "S2": "../images/voi-242/shape_S2.png", + "S3": "../images/voi-242/shape_S3.png", + "S4": "../images/voi-242/shape_S4.png", + "S5": "../images/voi-242/shape_S5.png" + } + }, + "ID": "voi-242", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V3", + "grid": [ + 4, + 2 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V2", + "grid": [ + 6, + 2 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V1", + "grid": [ + 6, + 1 + ] + } + ] + }, + "legacy_answer": "S1 0 V3 [4,2]\nS3 270 V2 [6,2]\nS4 180 V1 [6,1]", + "solutionText": "S1 0 V3 [4,2]\nS3 270 V2 [6,2]\nS4 180 V1 [6,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-242\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-243.json b/voi/data/voi-243.json new file mode 100644 index 0000000000000000000000000000000000000000..ec4bc6a02ed48ae679688de50223cc86d145ef2a --- /dev/null +++ b/voi/data/voi-243.json @@ -0,0 +1,233 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 7 + ], + [ + 4, + 5 + ], + [ + 6, + 5 + ], + [ + 6, + 7 + ] + ] + }, + { + "polygon": [ + [ + 1, + 7 + ], + [ + 1, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 7 + ] + ] + }, + { + "polygon": [ + [ + 3, + 7 + ], + [ + 3, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 6 + ], + [ + 6, + 6 + ], + [ + 6, + 7 + ] + ] + } + ], + "meta": { + "seed": 4204044, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "contourComplexity": 8, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.430357, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 244, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-243/target.png", + "shapes": { + "S1": "../images/voi-243/shape_S1.png", + "S2": "../images/voi-243/shape_S2.png", + "S3": "../images/voi-243/shape_S3.png", + "S4": "../images/voi-243/shape_S4.png", + "S5": "../images/voi-243/shape_S5.png" + } + }, + "ID": "voi-243", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 90, + "vertex": "V4", + "grid": [ + 6, + 7 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V4", + "grid": [ + 3, + 7 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V5", + "grid": [ + 6, + 6 + ] + } + ] + }, + "legacy_answer": "S2 90 V4 [6,7]\nS4 90 V4 [3,7]\nS5 90 V5 [6,6]", + "solutionText": "S2 90 V4 [6,7]\nS4 90 V4 [3,7]\nS5 90 V5 [6,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-243\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-244.json b/voi/data/voi-244.json new file mode 100644 index 0000000000000000000000000000000000000000..b65e78289dcdf3cbfe5dee4f30990847c8ac79b5 --- /dev/null +++ b/voi/data/voi-244.json @@ -0,0 +1,225 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 2 + ], + [ + 7, + 2 + ], + [ + 7, + 4 + ], + [ + 6, + 4 + ] + ] + }, + { + "polygon": [ + [ + 3, + 2 + ], + [ + 6, + 2 + ], + [ + 5, + 3 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 4, + 3 + ], + [ + 7, + 3 + ], + [ + 7, + 5 + ], + [ + 4, + 5 + ] + ] + } + ], + "meta": { + "seed": 4204045, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.189911, + "contourComplexity": 42, + "connectedComponents": 1, + "fillRatio": 0.133301, + "difficultyScore": 0.573755, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 245, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-244/target.png", + "shapes": { + "S1": "../images/voi-244/shape_S1.png", + "S2": "../images/voi-244/shape_S2.png", + "S3": "../images/voi-244/shape_S3.png", + "S4": "../images/voi-244/shape_S4.png", + "S5": "../images/voi-244/shape_S5.png" + } + }, + "ID": "voi-244", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V4", + "grid": [ + 6, + 4 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V2", + "grid": [ + 6, + 2 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V3", + "grid": [ + 7, + 5 + ] + } + ] + }, + "legacy_answer": "S1 0 V4 [6,4]\nS2 0 V2 [6,2]\nS5 0 V3 [7,5]", + "solutionText": "S1 0 V4 [6,4]\nS2 0 V2 [6,2]\nS5 0 V3 [7,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-244\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-245.json b/voi/data/voi-245.json new file mode 100644 index 0000000000000000000000000000000000000000..098a28fd5a276f70ab8bc4f7605f658a7b031016 --- /dev/null +++ b/voi/data/voi-245.json @@ -0,0 +1,221 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 4 + ], + [ + 7, + 4 + ], + [ + 7, + 6 + ], + [ + 4, + 6 + ] + ] + }, + { + "polygon": [ + [ + 7, + 2 + ], + [ + 7, + 5 + ], + [ + 5, + 5 + ], + [ + 5, + 2 + ] + ] + }, + { + "polygon": [ + [ + 8, + 5 + ], + [ + 6, + 5 + ], + [ + 6, + 4 + ], + [ + 8, + 4 + ] + ] + } + ], + "meta": { + "seed": 4204046, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "contourComplexity": 15, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.430357, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 246, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-245/target.png", + "shapes": { + "S1": "../images/voi-245/shape_S1.png", + "S2": "../images/voi-245/shape_S2.png", + "S3": "../images/voi-245/shape_S3.png", + "S4": "../images/voi-245/shape_S4.png", + "S5": "../images/voi-245/shape_S5.png" + } + }, + "ID": "voi-245", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 0, + "vertex": "V1", + "grid": [ + 4, + 4 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V3", + "grid": [ + 5, + 5 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V1", + "grid": [ + 8, + 5 + ] + } + ] + }, + "legacy_answer": "S2 0 V1 [4,4]\nS3 270 V3 [5,5]\nS4 180 V1 [8,5]", + "solutionText": "S2 0 V1 [4,4]\nS3 270 V3 [5,5]\nS4 180 V1 [8,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-245\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S5: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-246.json b/voi/data/voi-246.json new file mode 100644 index 0000000000000000000000000000000000000000..99d011195b70ea99b5146a5cedd53856f71893dc --- /dev/null +++ b/voi/data/voi-246.json @@ -0,0 +1,237 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 5 + ], + [ + 6, + 7 + ], + [ + 4, + 7 + ], + [ + 4, + 5 + ] + ] + }, + { + "polygon": [ + [ + 6, + 4 + ], + [ + 6, + 6 + ], + [ + 5, + 6 + ], + [ + 5, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 4 + ] + ] + }, + { + "polygon": [ + [ + 6, + 7 + ], + [ + 6, + 8 + ], + [ + 4, + 8 + ], + [ + 4, + 7 + ] + ] + } + ], + "meta": { + "seed": 4204047, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.125, + "difficultyScore": 0.55, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 247, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-246/target.png", + "shapes": { + "S1": "../images/voi-246/shape_S1.png", + "S2": "../images/voi-246/shape_S2.png", + "S3": "../images/voi-246/shape_S3.png", + "S4": "../images/voi-246/shape_S4.png", + "S5": "../images/voi-246/shape_S5.png" + } + }, + "ID": "voi-246", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 270, + "vertex": "V2", + "grid": [ + 6, + 7 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V3", + "grid": [ + 5, + 6 + ] + }, + { + "shape": "S5", + "angle": 270, + "vertex": "V3", + "grid": [ + 4, + 8 + ] + } + ] + }, + "legacy_answer": "S2 270 V2 [6,7]\nS3 270 V3 [5,6]\nS5 270 V3 [4,8]", + "solutionText": "S2 270 V2 [6,7]\nS3 270 V3 [5,6]\nS5 270 V3 [4,8]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-246\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S5: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-247.json b/voi/data/voi-247.json new file mode 100644 index 0000000000000000000000000000000000000000..beb7602bb22fbb84847765eb3d570912b46906f6 --- /dev/null +++ b/voi/data/voi-247.json @@ -0,0 +1,209 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 1, + 3 + ], + [ + 1, + 1 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 3, + 5 + ], + [ + 0, + 5 + ], + [ + 0, + 3 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 2, + 4 + ], + [ + 2, + 1 + ], + [ + 4, + 1 + ], + [ + 4, + 4 + ] + ] + } + ], + "meta": { + "seed": 4204048, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.217778, + "contourComplexity": 74, + "connectedComponents": 1, + "fillRatio": 0.171875, + "difficultyScore": 0.385139, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 248, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-247/target.png", + "shapes": { + "S1": "../images/voi-247/shape_S1.png", + "S2": "../images/voi-247/shape_S2.png", + "S3": "../images/voi-247/shape_S3.png", + "S4": "../images/voi-247/shape_S4.png", + "S5": "../images/voi-247/shape_S5.png" + } + }, + "ID": "voi-247", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V3", + "grid": [ + 3, + 3 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V2", + "grid": [ + 0, + 5 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V3", + "grid": [ + 4, + 1 + ] + } + ] + }, + "legacy_answer": "S1 90 V3 [3,3]\nS2 180 V2 [0,5]\nS4 90 V3 [4,1]", + "solutionText": "S1 90 V3 [3,3]\nS2 180 V2 [0,5]\nS4 90 V3 [4,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-247\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[0,1]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-248.json b/voi/data/voi-248.json new file mode 100644 index 0000000000000000000000000000000000000000..64b5a17d43624942ec1715eb4eba2f76dfbfe1cf --- /dev/null +++ b/voi/data/voi-248.json @@ -0,0 +1,221 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 7, + 5 + ], + [ + 6, + 5 + ], + [ + 6, + 4 + ], + [ + 7, + 4 + ] + ] + }, + { + "polygon": [ + [ + 8, + 5 + ], + [ + 8, + 6 + ], + [ + 5, + 6 + ], + [ + 5, + 5 + ] + ] + }, + { + "polygon": [ + [ + 7, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 3 + ], + [ + 7, + 3 + ] + ] + } + ], + "meta": { + "seed": 4204049, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.125, + "difficultyScore": 0.55, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 249, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-248/target.png", + "shapes": { + "S1": "../images/voi-248/shape_S1.png", + "S2": "../images/voi-248/shape_S2.png", + "S3": "../images/voi-248/shape_S3.png", + "S4": "../images/voi-248/shape_S4.png", + "S5": "../images/voi-248/shape_S5.png" + } + }, + "ID": "voi-248", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 180, + "vertex": "V2", + "grid": [ + 6, + 5 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V3", + "grid": [ + 5, + 6 + ] + }, + { + "shape": "S5", + "angle": 180, + "vertex": "V2", + "grid": [ + 4, + 5 + ] + } + ] + }, + "legacy_answer": "S2 180 V2 [6,5]\nS3 270 V3 [5,6]\nS5 180 V2 [4,5]", + "solutionText": "S2 180 V2 [6,5]\nS3 270 V3 [5,6]\nS5 180 V2 [4,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-248\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S2: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S3: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S4: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-249.json b/voi/data/voi-249.json new file mode 100644 index 0000000000000000000000000000000000000000..a48e99773d8844f554255cae155307d7ce5f5bd8 --- /dev/null +++ b/voi/data/voi-249.json @@ -0,0 +1,213 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 4 + ], + [ + 4, + 4 + ], + [ + 2, + 6 + ] + ] + }, + { + "polygon": [ + [ + 5, + 6 + ], + [ + 2, + 6 + ], + [ + 2, + 4 + ], + [ + 5, + 4 + ] + ] + }, + { + "polygon": [ + [ + 4, + 2 + ], + [ + 7, + 2 + ], + [ + 7, + 4 + ], + [ + 4, + 4 + ] + ] + } + ], + "meta": { + "seed": 4204050, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.293333, + "contourComplexity": 68, + "connectedComponents": 1, + "fillRatio": 0.155273, + "difficultyScore": 0.462786, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 250, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-249/target.png", + "shapes": { + "S1": "../images/voi-249/shape_S1.png", + "S2": "../images/voi-249/shape_S2.png", + "S3": "../images/voi-249/shape_S3.png", + "S4": "../images/voi-249/shape_S4.png", + "S5": "../images/voi-249/shape_S5.png" + } + }, + "ID": "voi-249", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 0, + "vertex": "V2", + "grid": [ + 4, + 4 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V3", + "grid": [ + 2, + 4 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V4", + "grid": [ + 4, + 4 + ] + } + ] + }, + "legacy_answer": "S2 0 V2 [4,4]\nS3 180 V3 [2,4]\nS5 0 V4 [4,4]", + "solutionText": "S2 0 V2 [4,4]\nS3 180 V3 [2,4]\nS5 0 V4 [4,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-249\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-250.json b/voi/data/voi-250.json new file mode 100644 index 0000000000000000000000000000000000000000..dec32a3a3f06e0e14f8925be869cd056a87ceeaa --- /dev/null +++ b/voi/data/voi-250.json @@ -0,0 +1,245 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 6 + ], + [ + 1, + 6 + ], + [ + 1, + 4 + ], + [ + 3, + 4 + ] + ] + }, + { + "polygon": [ + [ + 3, + 3 + ], + [ + 3, + 5 + ], + [ + 2, + 5 + ], + [ + 2, + 4 + ], + [ + 0, + 4 + ], + [ + 0, + 3 + ] + ] + }, + { + "polygon": [ + [ + 2, + 8 + ], + [ + 2, + 6 + ], + [ + 4, + 6 + ], + [ + 4, + 8 + ] + ] + } + ], + "meta": { + "seed": 4204051, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.166667, + "contourComplexity": 14, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.620833, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 251, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-250/target.png", + "shapes": { + "S1": "../images/voi-250/shape_S1.png", + "S2": "../images/voi-250/shape_S2.png", + "S3": "../images/voi-250/shape_S3.png", + "S4": "../images/voi-250/shape_S4.png", + "S5": "../images/voi-250/shape_S5.png" + } + }, + "ID": "voi-250", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V3", + "grid": [ + 1, + 4 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V4", + "grid": [ + 2, + 4 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V3", + "grid": [ + 4, + 6 + ] + } + ] + }, + "legacy_answer": "S1 180 V3 [1,4]\nS3 270 V4 [2,4]\nS4 90 V3 [4,6]", + "solutionText": "S1 180 V3 [1,4]\nS3 270 V4 [2,4]\nS4 90 V3 [4,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-250\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-251.json b/voi/data/voi-251.json new file mode 100644 index 0000000000000000000000000000000000000000..924044c152a96a6376636e5c63e7d99db1d5e3ad --- /dev/null +++ b/voi/data/voi-251.json @@ -0,0 +1,221 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 5 + ], + [ + 3, + 5 + ], + [ + 4, + 4 + ], + [ + 6, + 4 + ] + ] + }, + { + "polygon": [ + [ + 2, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 6 + ], + [ + 2, + 6 + ] + ] + }, + { + "polygon": [ + [ + 2, + 5 + ], + [ + 5, + 5 + ], + [ + 5, + 7 + ], + [ + 2, + 7 + ] + ] + } + ], + "meta": { + "seed": 4204052, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.173442, + "contourComplexity": 42, + "connectedComponents": 1, + "fillRatio": 0.148926, + "difficultyScore": 0.608381, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 252, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-251/target.png", + "shapes": { + "S1": "../images/voi-251/shape_S1.png", + "S2": "../images/voi-251/shape_S2.png", + "S3": "../images/voi-251/shape_S3.png", + "S4": "../images/voi-251/shape_S4.png", + "S5": "../images/voi-251/shape_S5.png" + } + }, + "ID": "voi-251", + "answer": { + "placements": [ + { + "shape": "S3", + "angle": 180, + "vertex": "V2", + "grid": [ + 3, + 5 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V1", + "grid": [ + 2, + 3 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V4", + "grid": [ + 2, + 7 + ] + } + ] + }, + "legacy_answer": "S3 180 V2 [3,5]\nS4 0 V1 [2,3]\nS5 0 V4 [2,7]", + "solutionText": "S3 180 V2 [3,5]\nS4 0 V1 [2,3]\nS5 0 V4 [2,7]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-251\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S3: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-252.json b/voi/data/voi-252.json new file mode 100644 index 0000000000000000000000000000000000000000..b8b6758b5e895b9aa35cff12ad92addbf6f8abaf --- /dev/null +++ b/voi/data/voi-252.json @@ -0,0 +1,217 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 0, + 6 + ], + [ + 0, + 4 + ], + [ + 2, + 4 + ], + [ + 2, + 6 + ] + ] + }, + { + "polygon": [ + [ + 0, + 5 + ], + [ + 1, + 5 + ], + [ + 1, + 7 + ], + [ + 0, + 7 + ] + ] + }, + { + "polygon": [ + [ + 4, + 7 + ], + [ + 1, + 7 + ], + [ + 1, + 6 + ], + [ + 4, + 6 + ] + ] + } + ], + "meta": { + "seed": 4204053, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.109375, + "difficultyScore": 0.492361, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 253, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-252/target.png", + "shapes": { + "S1": "../images/voi-252/shape_S1.png", + "S2": "../images/voi-252/shape_S2.png", + "S3": "../images/voi-252/shape_S3.png", + "S4": "../images/voi-252/shape_S4.png", + "S5": "../images/voi-252/shape_S5.png" + } + }, + "ID": "voi-252", + "answer": { + "placements": [ + { + "shape": "S3", + "angle": 90, + "vertex": "V2", + "grid": [ + 0, + 4 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V1", + "grid": [ + 0, + 5 + ] + }, + { + "shape": "S5", + "angle": 180, + "vertex": "V3", + "grid": [ + 1, + 6 + ] + } + ] + }, + "legacy_answer": "S3 90 V2 [0,4]\nS4 0 V1 [0,5]\nS5 180 V3 [1,6]", + "solutionText": "S3 90 V2 [0,4]\nS4 0 V1 [0,5]\nS5 180 V3 [1,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-252\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-253.json b/voi/data/voi-253.json new file mode 100644 index 0000000000000000000000000000000000000000..0f919462f92f43a106dbd88b97d548c803f39473 --- /dev/null +++ b/voi/data/voi-253.json @@ -0,0 +1,225 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 3 + ], + [ + 5, + 3 + ], + [ + 5, + 5 + ], + [ + 2, + 5 + ] + ] + }, + { + "polygon": [ + [ + 1, + 6 + ], + [ + 1, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 6 + ] + ] + }, + { + "polygon": [ + [ + 3, + 6 + ], + [ + 3, + 5 + ], + [ + 6, + 5 + ], + [ + 6, + 6 + ] + ] + } + ], + "meta": { + "seed": 4204054, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.266667, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.171875, + "difficultyScore": 0.322917, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 254, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-253/target.png", + "shapes": { + "S1": "../images/voi-253/shape_S1.png", + "S2": "../images/voi-253/shape_S2.png", + "S3": "../images/voi-253/shape_S3.png", + "S4": "../images/voi-253/shape_S4.png", + "S5": "../images/voi-253/shape_S5.png" + } + }, + "ID": "voi-253", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V1", + "grid": [ + 2, + 3 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V3", + "grid": [ + 3, + 3 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V3", + "grid": [ + 6, + 5 + ] + } + ] + }, + "legacy_answer": "S1 0 V1 [2,3]\nS3 90 V3 [3,3]\nS4 90 V3 [6,5]", + "solutionText": "S1 0 V1 [2,3]\nS3 90 V3 [3,3]\nS4 90 V3 [6,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-253\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[0,1]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-254.json b/voi/data/voi-254.json new file mode 100644 index 0000000000000000000000000000000000000000..d6c9564f4f3bff3acf95a817742327f59e34ce62 --- /dev/null +++ b/voi/data/voi-254.json @@ -0,0 +1,245 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 4 + ], + [ + 2, + 4 + ], + [ + 2, + 2 + ], + [ + 5, + 2 + ] + ] + }, + { + "polygon": [ + [ + 5, + 1 + ], + [ + 6, + 1 + ], + [ + 6, + 4 + ], + [ + 5, + 4 + ] + ] + }, + { + "polygon": [ + [ + 6, + 1 + ], + [ + 6, + 3 + ], + [ + 5, + 3 + ], + [ + 5, + 2 + ], + [ + 3, + 2 + ], + [ + 3, + 1 + ] + ] + } + ], + "meta": { + "seed": 4204055, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.307692, + "contourComplexity": 8, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.549519, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 255, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-254/target.png", + "shapes": { + "S1": "../images/voi-254/shape_S1.png", + "S2": "../images/voi-254/shape_S2.png", + "S3": "../images/voi-254/shape_S3.png", + "S4": "../images/voi-254/shape_S4.png", + "S5": "../images/voi-254/shape_S5.png" + } + }, + "ID": "voi-254", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V1", + "grid": [ + 5, + 4 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V2", + "grid": [ + 6, + 1 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V1", + "grid": [ + 6, + 1 + ] + } + ] + }, + "legacy_answer": "S1 180 V1 [5,4]\nS2 0 V2 [6,1]\nS3 270 V1 [6,1]", + "solutionText": "S1 180 V1 [5,4]\nS2 0 V2 [6,1]\nS3 270 V1 [6,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-254\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-255.json b/voi/data/voi-255.json new file mode 100644 index 0000000000000000000000000000000000000000..84ba7052d88ecc77f09ba82189894f42d070e5e3 --- /dev/null +++ b/voi/data/voi-255.json @@ -0,0 +1,229 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 0, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 5 + ], + [ + 0, + 5 + ] + ] + }, + { + "polygon": [ + [ + 0, + 3 + ], + [ + 0, + 1 + ], + [ + 2, + 1 + ], + [ + 2, + 3 + ] + ] + }, + { + "polygon": [ + [ + 2, + 4 + ], + [ + 2, + 1 + ], + [ + 3, + 2 + ], + [ + 3, + 4 + ] + ] + } + ], + "meta": { + "seed": 4204056, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.159601, + "contourComplexity": 38, + "connectedComponents": 1, + "fillRatio": 0.164551, + "difficultyScore": 0.632494, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 256, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-255/target.png", + "shapes": { + "S1": "../images/voi-255/shape_S1.png", + "S2": "../images/voi-255/shape_S2.png", + "S3": "../images/voi-255/shape_S3.png", + "S4": "../images/voi-255/shape_S4.png", + "S5": "../images/voi-255/shape_S5.png" + } + }, + "ID": "voi-255", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V3", + "grid": [ + 3, + 5 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V3", + "grid": [ + 2, + 1 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V4", + "grid": [ + 3, + 4 + ] + } + ] + }, + "legacy_answer": "S1 0 V3 [3,5]\nS2 90 V3 [2,1]\nS5 90 V4 [3,4]", + "solutionText": "S1 0 V3 [3,5]\nS2 90 V3 [2,1]\nS5 90 V4 [3,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-255\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S5: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-256.json b/voi/data/voi-256.json new file mode 100644 index 0000000000000000000000000000000000000000..11790e844154d00faf49c39c8c0bf032e9780651 --- /dev/null +++ b/voi/data/voi-256.json @@ -0,0 +1,221 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 7, + 3 + ], + [ + 5, + 3 + ], + [ + 5, + 2 + ], + [ + 7, + 2 + ] + ] + }, + { + "polygon": [ + [ + 3, + 3 + ], + [ + 6, + 3 + ], + [ + 6, + 4 + ], + [ + 3, + 4 + ] + ] + }, + { + "polygon": [ + [ + 6, + 5 + ], + [ + 6, + 2 + ], + [ + 8, + 2 + ], + [ + 8, + 5 + ] + ] + } + ], + "meta": { + "seed": 4204057, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "contourComplexity": 12, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.591477, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 257, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-256/target.png", + "shapes": { + "S1": "../images/voi-256/shape_S1.png", + "S2": "../images/voi-256/shape_S2.png", + "S3": "../images/voi-256/shape_S3.png", + "S4": "../images/voi-256/shape_S4.png", + "S5": "../images/voi-256/shape_S5.png" + } + }, + "ID": "voi-256", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 180, + "vertex": "V4", + "grid": [ + 7, + 2 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V4", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V3", + "grid": [ + 8, + 2 + ] + } + ] + }, + "legacy_answer": "S2 180 V4 [7,2]\nS4 0 V4 [3,4]\nS5 90 V3 [8,2]", + "solutionText": "S2 180 V4 [7,2]\nS4 0 V4 [3,4]\nS5 90 V3 [8,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-256\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-257.json b/voi/data/voi-257.json new file mode 100644 index 0000000000000000000000000000000000000000..5064a7895fe28c46acf8e109544ea31632f51574 --- /dev/null +++ b/voi/data/voi-257.json @@ -0,0 +1,197 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 5 + ], + [ + 2, + 5 + ] + ] + }, + { + "polygon": [ + [ + 1, + 5 + ], + [ + 1, + 3 + ], + [ + 3, + 5 + ] + ] + }, + { + "polygon": [ + [ + 0, + 2 + ], + [ + 2, + 2 + ], + [ + 0, + 4 + ] + ] + } + ], + "meta": { + "seed": 4204058, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.130769, + "contourComplexity": 132, + "connectedComponents": 1, + "fillRatio": 0.110352, + "difficultyScore": 0.85622, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 258, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-257/target.png", + "shapes": { + "S1": "../images/voi-257/shape_S1.png", + "S2": "../images/voi-257/shape_S2.png", + "S3": "../images/voi-257/shape_S3.png", + "S4": "../images/voi-257/shape_S4.png", + "S5": "../images/voi-257/shape_S5.png" + } + }, + "ID": "voi-257", + "answer": { + "placements": [ + { + "shape": "S3", + "angle": 0, + "vertex": "V3", + "grid": [ + 4, + 5 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V1", + "grid": [ + 1, + 5 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V3", + "grid": [ + 0, + 4 + ] + } + ] + }, + "legacy_answer": "S3 0 V3 [4,5]\nS4 90 V1 [1,5]\nS5 0 V3 [0,4]", + "solutionText": "S3 0 V3 [4,5]\nS4 90 V1 [1,5]\nS5 0 V3 [0,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-257\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-258.json b/voi/data/voi-258.json new file mode 100644 index 0000000000000000000000000000000000000000..baeb2572c9c39f0fa0a180e974e12c0d48041541 --- /dev/null +++ b/voi/data/voi-258.json @@ -0,0 +1,217 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 7, + 3 + ], + [ + 7, + 5 + ], + [ + 6, + 5 + ], + [ + 6, + 3 + ] + ] + }, + { + "polygon": [ + [ + 6, + 4 + ], + [ + 6, + 2 + ], + [ + 8, + 2 + ], + [ + 8, + 4 + ] + ] + }, + { + "polygon": [ + [ + 7, + 7 + ], + [ + 7, + 4 + ], + [ + 8, + 5 + ], + [ + 8, + 7 + ] + ] + } + ], + "meta": { + "seed": 4204059, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.234432, + "contourComplexity": 42, + "connectedComponents": 1, + "fillRatio": 0.102051, + "difficultyScore": 0.458169, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 259, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-258/target.png", + "shapes": { + "S1": "../images/voi-258/shape_S1.png", + "S2": "../images/voi-258/shape_S2.png", + "S3": "../images/voi-258/shape_S3.png", + "S4": "../images/voi-258/shape_S4.png", + "S5": "../images/voi-258/shape_S5.png" + } + }, + "ID": "voi-258", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 270, + "vertex": "V3", + "grid": [ + 6, + 5 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V4", + "grid": [ + 8, + 4 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V1", + "grid": [ + 7, + 7 + ] + } + ] + }, + "legacy_answer": "S2 270 V3 [6,5]\nS3 90 V4 [8,4]\nS5 90 V1 [7,7]", + "solutionText": "S2 270 V3 [6,5]\nS3 90 V4 [8,4]\nS5 90 V1 [7,7]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-258\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S5: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-259.json b/voi/data/voi-259.json new file mode 100644 index 0000000000000000000000000000000000000000..1348bdc6b36bec1d29236d9d1d6c44643e28e47b --- /dev/null +++ b/voi/data/voi-259.json @@ -0,0 +1,233 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 7, + 5 + ], + [ + 7, + 7 + ], + [ + 6, + 7 + ], + [ + 6, + 6 + ], + [ + 4, + 6 + ], + [ + 4, + 5 + ] + ] + }, + { + "polygon": [ + [ + 7, + 6 + ], + [ + 7, + 7 + ], + [ + 4, + 7 + ], + [ + 4, + 6 + ] + ] + }, + { + "polygon": [ + [ + 8, + 6 + ], + [ + 8, + 8 + ], + [ + 6, + 8 + ], + [ + 6, + 6 + ] + ] + } + ], + "meta": { + "seed": 4204060, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "contourComplexity": 8, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.591477, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 260, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-259/target.png", + "shapes": { + "S1": "../images/voi-259/shape_S1.png", + "S2": "../images/voi-259/shape_S2.png", + "S3": "../images/voi-259/shape_S3.png", + "S4": "../images/voi-259/shape_S4.png", + "S5": "../images/voi-259/shape_S5.png" + } + }, + "ID": "voi-259", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V6", + "grid": [ + 4, + 5 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V2", + "grid": [ + 7, + 7 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V4", + "grid": [ + 6, + 6 + ] + } + ] + }, + "legacy_answer": "S1 270 V6 [4,5]\nS3 270 V2 [7,7]\nS4 270 V4 [6,6]", + "solutionText": "S1 270 V6 [4,5]\nS3 270 V2 [7,7]\nS4 270 V4 [6,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-259\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S5: V1=[0,0], V2=[1,0], V3=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-260.json b/voi/data/voi-260.json new file mode 100644 index 0000000000000000000000000000000000000000..17b208f51e8d0c77a417737315cf063ccbb11a47 --- /dev/null +++ b/voi/data/voi-260.json @@ -0,0 +1,221 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 4 + ], + [ + 3, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 4 + ] + ] + }, + { + "polygon": [ + [ + 5, + 3 + ], + [ + 5, + 6 + ], + [ + 3, + 6 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 6, + 3 + ], + [ + 6, + 6 + ], + [ + 5, + 5 + ], + [ + 5, + 3 + ] + ] + } + ], + "meta": { + "seed": 4204061, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.209836, + "contourComplexity": 38, + "connectedComponents": 1, + "fillRatio": 0.117676, + "difficultyScore": 0.525304, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 261, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-260/target.png", + "shapes": { + "S1": "../images/voi-260/shape_S1.png", + "S2": "../images/voi-260/shape_S2.png", + "S3": "../images/voi-260/shape_S3.png", + "S4": "../images/voi-260/shape_S4.png", + "S5": "../images/voi-260/shape_S5.png" + } + }, + "ID": "voi-260", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 90, + "vertex": "V3", + "grid": [ + 4, + 3 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V2", + "grid": [ + 5, + 6 + ] + }, + { + "shape": "S5", + "angle": 270, + "vertex": "V4", + "grid": [ + 5, + 3 + ] + } + ] + }, + "legacy_answer": "S2 90 V3 [4,3]\nS3 270 V2 [5,6]\nS5 270 V4 [5,3]", + "solutionText": "S2 90 V3 [4,3]\nS3 270 V2 [5,6]\nS5 270 V4 [5,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-260\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S5: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-261.json b/voi/data/voi-261.json new file mode 100644 index 0000000000000000000000000000000000000000..982f2e6c0dfb8a02ae79427912524cd175483230 --- /dev/null +++ b/voi/data/voi-261.json @@ -0,0 +1,221 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 6 + ], + [ + 6, + 3 + ], + [ + 8, + 3 + ], + [ + 8, + 6 + ] + ] + }, + { + "polygon": [ + [ + 7, + 5 + ], + [ + 6, + 5 + ], + [ + 6, + 3 + ], + [ + 7, + 3 + ] + ] + }, + { + "polygon": [ + [ + 8, + 8 + ], + [ + 5, + 8 + ], + [ + 5, + 6 + ], + [ + 8, + 6 + ] + ] + } + ], + "meta": { + "seed": 4204062, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "contourComplexity": 8, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.430357, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 262, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-261/target.png", + "shapes": { + "S1": "../images/voi-261/shape_S1.png", + "S2": "../images/voi-261/shape_S2.png", + "S3": "../images/voi-261/shape_S3.png", + "S4": "../images/voi-261/shape_S4.png", + "S5": "../images/voi-261/shape_S5.png" + } + }, + "ID": "voi-261", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V4", + "grid": [ + 8, + 6 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V3", + "grid": [ + 6, + 3 + ] + }, + { + "shape": "S5", + "angle": 180, + "vertex": "V1", + "grid": [ + 8, + 8 + ] + } + ] + }, + "legacy_answer": "S1 90 V4 [8,6]\nS4 180 V3 [6,3]\nS5 180 V1 [8,8]", + "solutionText": "S1 90 V4 [8,6]\nS4 180 V3 [6,3]\nS5 180 V1 [8,8]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-261\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S3: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-262.json b/voi/data/voi-262.json new file mode 100644 index 0000000000000000000000000000000000000000..3313c8e5cc144cd5cfb2371312c0d6ea5fce5e56 --- /dev/null +++ b/voi/data/voi-262.json @@ -0,0 +1,229 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 3 + ], + [ + 3, + 5 + ], + [ + 1, + 5 + ], + [ + 1, + 3 + ] + ] + }, + { + "polygon": [ + [ + 2, + 3 + ], + [ + 2, + 0 + ], + [ + 4, + 0 + ], + [ + 4, + 3 + ] + ] + }, + { + "polygon": [ + [ + 4, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 2 + ], + [ + 4, + 2 + ] + ] + } + ], + "meta": { + "seed": 4204063, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.153846, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.171875, + "difficultyScore": 0.640865, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 263, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-262/target.png", + "shapes": { + "S1": "../images/voi-262/shape_S1.png", + "S2": "../images/voi-262/shape_S2.png", + "S3": "../images/voi-262/shape_S3.png", + "S4": "../images/voi-262/shape_S4.png", + "S5": "../images/voi-262/shape_S5.png" + } + }, + "ID": "voi-262", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V4", + "grid": [ + 1, + 3 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V3", + "grid": [ + 4, + 0 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V1", + "grid": [ + 4, + 5 + ] + } + ] + }, + "legacy_answer": "S1 270 V4 [1,3]\nS2 90 V3 [4,0]\nS3 180 V1 [4,5]", + "solutionText": "S1 270 V4 [1,3]\nS2 90 V3 [4,0]\nS3 180 V1 [4,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-262\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S5: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-263.json b/voi/data/voi-263.json new file mode 100644 index 0000000000000000000000000000000000000000..fe6fb83c601904991f589b6d67a83bf7e0312462 --- /dev/null +++ b/voi/data/voi-263.json @@ -0,0 +1,241 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 0, + 6 + ], + [ + 0, + 3 + ], + [ + 2, + 3 + ], + [ + 2, + 6 + ] + ] + }, + { + "polygon": [ + [ + 2, + 4 + ], + [ + 2, + 2 + ], + [ + 4, + 2 + ], + [ + 4, + 4 + ] + ] + }, + { + "polygon": [ + [ + 2, + 7 + ], + [ + 0, + 7 + ], + [ + 0, + 6 + ], + [ + 1, + 6 + ], + [ + 1, + 4 + ], + [ + 2, + 4 + ] + ] + } + ], + "meta": { + "seed": 4204064, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.430357, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 264, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-263/target.png", + "shapes": { + "S1": "../images/voi-263/shape_S1.png", + "S2": "../images/voi-263/shape_S2.png", + "S3": "../images/voi-263/shape_S3.png", + "S4": "../images/voi-263/shape_S4.png", + "S5": "../images/voi-263/shape_S5.png" + } + }, + "ID": "voi-263", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V3", + "grid": [ + 2, + 3 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V1", + "grid": [ + 2, + 4 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V3", + "grid": [ + 0, + 6 + ] + } + ] + }, + "legacy_answer": "S1 90 V3 [2,3]\nS3 90 V1 [2,4]\nS4 180 V3 [0,6]", + "solutionText": "S1 90 V3 [2,3]\nS3 90 V1 [2,4]\nS4 180 V3 [0,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-263\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S5: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-264.json b/voi/data/voi-264.json new file mode 100644 index 0000000000000000000000000000000000000000..89d11c200c9ac2fa16ffda552ed6cbc530f5d1f1 --- /dev/null +++ b/voi/data/voi-264.json @@ -0,0 +1,205 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 5 + ], + [ + 3, + 5 + ], + [ + 5, + 3 + ] + ] + }, + { + "polygon": [ + [ + 5, + 1 + ], + [ + 5, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 1 + ] + ] + }, + { + "polygon": [ + [ + 6, + 1 + ], + [ + 6, + 3 + ], + [ + 4, + 1 + ] + ] + } + ], + "meta": { + "seed": 4204065, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.209877, + "contourComplexity": 136, + "connectedComponents": 1, + "fillRatio": 0.125, + "difficultyScore": 0.510494, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 265, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-264/target.png", + "shapes": { + "S1": "../images/voi-264/shape_S1.png", + "S2": "../images/voi-264/shape_S2.png", + "S3": "../images/voi-264/shape_S3.png", + "S4": "../images/voi-264/shape_S4.png", + "S5": "../images/voi-264/shape_S5.png" + } + }, + "ID": "voi-264", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V3", + "grid": [ + 5, + 3 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V3", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S5", + "angle": 270, + "vertex": "V1", + "grid": [ + 6, + 1 + ] + } + ] + }, + "legacy_answer": "S1 180 V3 [5,3]\nS2 270 V3 [3,4]\nS5 270 V1 [6,1]", + "solutionText": "S1 180 V3 [5,3]\nS2 270 V3 [3,4]\nS5 270 V1 [6,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-264\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-265.json b/voi/data/voi-265.json new file mode 100644 index 0000000000000000000000000000000000000000..cee4893a4f4564ac16caca4cc70cc6499f422c2b --- /dev/null +++ b/voi/data/voi-265.json @@ -0,0 +1,237 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 7 + ], + [ + 3, + 7 + ] + ] + }, + { + "polygon": [ + [ + 7, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 3 + ], + [ + 7, + 3 + ] + ] + }, + { + "polygon": [ + [ + 4, + 4 + ], + [ + 7, + 4 + ], + [ + 7, + 6 + ], + [ + 4, + 6 + ] + ] + } + ], + "meta": { + "seed": 4204066, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.166667, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.620833, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 266, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-265/target.png", + "shapes": { + "S1": "../images/voi-265/shape_S1.png", + "S2": "../images/voi-265/shape_S2.png", + "S3": "../images/voi-265/shape_S3.png", + "S4": "../images/voi-265/shape_S4.png", + "S5": "../images/voi-265/shape_S5.png" + } + }, + "ID": "voi-265", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V2", + "grid": [ + 5, + 4 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V2", + "grid": [ + 5, + 4 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V2", + "grid": [ + 7, + 4 + ] + } + ] + }, + "legacy_answer": "S1 0 V2 [5,4]\nS4 180 V2 [5,4]\nS5 0 V2 [7,4]", + "solutionText": "S1 0 V2 [5,4]\nS4 180 V2 [5,4]\nS5 0 V2 [7,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-265\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S2: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S3: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-266.json b/voi/data/voi-266.json new file mode 100644 index 0000000000000000000000000000000000000000..4a44b72493a1b82b9e7bf85ec5b27a71b29c3486 --- /dev/null +++ b/voi/data/voi-266.json @@ -0,0 +1,237 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 0 + ], + [ + 5, + 1 + ], + [ + 4, + 1 + ], + [ + 4, + 0 + ] + ] + }, + { + "polygon": [ + [ + 6, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 2 + ], + [ + 5, + 2 + ], + [ + 5, + 0 + ], + [ + 6, + 0 + ] + ] + }, + { + "polygon": [ + [ + 5, + 2 + ], + [ + 3, + 2 + ], + [ + 3, + 0 + ], + [ + 5, + 0 + ] + ] + } + ], + "meta": { + "seed": 4204067, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.109375, + "difficultyScore": 0.492361, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 267, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-266/target.png", + "shapes": { + "S1": "../images/voi-266/shape_S1.png", + "S2": "../images/voi-266/shape_S2.png", + "S3": "../images/voi-266/shape_S3.png", + "S4": "../images/voi-266/shape_S4.png", + "S5": "../images/voi-266/shape_S5.png" + } + }, + "ID": "voi-266", + "answer": { + "placements": [ + { + "shape": "S3", + "angle": 270, + "vertex": "V1", + "grid": [ + 5, + 0 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V4", + "grid": [ + 5, + 2 + ] + }, + { + "shape": "S5", + "angle": 180, + "vertex": "V4", + "grid": [ + 5, + 0 + ] + } + ] + }, + "legacy_answer": "S3 270 V1 [5,0]\nS4 180 V4 [5,2]\nS5 180 V4 [5,0]", + "solutionText": "S3 270 V1 [5,0]\nS4 180 V4 [5,2]\nS5 180 V4 [5,0]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-266\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S2: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S3: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S5: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-267.json b/voi/data/voi-267.json new file mode 100644 index 0000000000000000000000000000000000000000..8b86a84aa8121390312fb1481aca602604fa6333 --- /dev/null +++ b/voi/data/voi-267.json @@ -0,0 +1,245 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 3 + ], + [ + 8, + 3 + ], + [ + 8, + 5 + ], + [ + 5, + 5 + ] + ] + }, + { + "polygon": [ + [ + 6, + 5 + ], + [ + 5, + 5 + ], + [ + 5, + 4 + ], + [ + 6, + 4 + ] + ] + }, + { + "polygon": [ + [ + 5, + 3 + ], + [ + 5, + 1 + ], + [ + 6, + 1 + ], + [ + 6, + 2 + ], + [ + 8, + 2 + ], + [ + 8, + 3 + ] + ] + } + ], + "meta": { + "seed": 4204068, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "contourComplexity": 8, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.591477, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 268, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-267/target.png", + "shapes": { + "S1": "../images/voi-267/shape_S1.png", + "S2": "../images/voi-267/shape_S2.png", + "S3": "../images/voi-267/shape_S3.png", + "S4": "../images/voi-267/shape_S4.png", + "S5": "../images/voi-267/shape_S5.png" + } + }, + "ID": "voi-267", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V2", + "grid": [ + 8, + 3 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V1", + "grid": [ + 6, + 5 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V4", + "grid": [ + 6, + 2 + ] + } + ] + }, + "legacy_answer": "S1 0 V2 [8,3]\nS2 180 V1 [6,5]\nS5 90 V4 [6,2]", + "solutionText": "S1 0 V2 [8,3]\nS2 180 V1 [6,5]\nS5 90 V4 [6,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-267\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-268.json b/voi/data/voi-268.json new file mode 100644 index 0000000000000000000000000000000000000000..052cad2adbe11501838fe781ab944f30f5d820ec --- /dev/null +++ b/voi/data/voi-268.json @@ -0,0 +1,221 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 7, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 3 + ], + [ + 7, + 3 + ] + ] + }, + { + "polygon": [ + [ + 8, + 3 + ], + [ + 6, + 3 + ], + [ + 6, + 2 + ], + [ + 8, + 2 + ] + ] + }, + { + "polygon": [ + [ + 6, + 1 + ], + [ + 6, + 4 + ], + [ + 4, + 4 + ], + [ + 4, + 1 + ] + ] + } + ], + "meta": { + "seed": 4204069, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "contourComplexity": 12, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.430357, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 269, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-268/target.png", + "shapes": { + "S1": "../images/voi-268/shape_S1.png", + "S2": "../images/voi-268/shape_S2.png", + "S3": "../images/voi-268/shape_S3.png", + "S4": "../images/voi-268/shape_S4.png", + "S5": "../images/voi-268/shape_S5.png" + } + }, + "ID": "voi-268", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V3", + "grid": [ + 4, + 3 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V1", + "grid": [ + 8, + 3 + ] + }, + { + "shape": "S5", + "angle": 270, + "vertex": "V2", + "grid": [ + 6, + 4 + ] + } + ] + }, + "legacy_answer": "S1 180 V3 [4,3]\nS2 180 V1 [8,3]\nS5 270 V2 [6,4]", + "solutionText": "S1 180 V3 [4,3]\nS2 180 V1 [8,3]\nS5 270 V2 [6,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-268\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-269.json b/voi/data/voi-269.json new file mode 100644 index 0000000000000000000000000000000000000000..9c116dd52fee2fdd00a6ec55a00ebc32f8afd717 --- /dev/null +++ b/voi/data/voi-269.json @@ -0,0 +1,237 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 2 + ], + [ + 5, + 2 + ], + [ + 5, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 5 + ], + [ + 3, + 5 + ] + ] + }, + { + "polygon": [ + [ + 3, + 4 + ], + [ + 3, + 3 + ], + [ + 5, + 3 + ], + [ + 5, + 4 + ] + ] + }, + { + "polygon": [ + [ + 2, + 5 + ], + [ + 2, + 2 + ], + [ + 3, + 2 + ], + [ + 3, + 5 + ] + ] + } + ], + "meta": { + "seed": 4204070, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.109375, + "difficultyScore": 0.492361, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 270, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-269/target.png", + "shapes": { + "S1": "../images/voi-269/shape_S1.png", + "S2": "../images/voi-269/shape_S2.png", + "S3": "../images/voi-269/shape_S3.png", + "S4": "../images/voi-269/shape_S4.png", + "S5": "../images/voi-269/shape_S5.png" + } + }, + "ID": "voi-269", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V4", + "grid": [ + 4, + 3 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V3", + "grid": [ + 5, + 3 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V2", + "grid": [ + 2, + 2 + ] + } + ] + }, + "legacy_answer": "S1 0 V4 [4,3]\nS4 90 V3 [5,3]\nS5 90 V2 [2,2]", + "solutionText": "S1 0 V4 [4,3]\nS4 90 V3 [5,3]\nS5 90 V2 [2,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-269\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S2: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S3: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S4: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-270.json b/voi/data/voi-270.json new file mode 100644 index 0000000000000000000000000000000000000000..fc1de66360e1f6d9632e500525bbf89f79efbe40 --- /dev/null +++ b/voi/data/voi-270.json @@ -0,0 +1,237 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 4 + ], + [ + 4, + 1 + ], + [ + 5, + 1 + ], + [ + 5, + 4 + ] + ] + }, + { + "polygon": [ + [ + 3, + 1 + ], + [ + 5, + 1 + ], + [ + 5, + 2 + ], + [ + 4, + 2 + ], + [ + 4, + 4 + ], + [ + 3, + 4 + ] + ] + }, + { + "polygon": [ + [ + 6, + 5 + ], + [ + 5, + 5 + ], + [ + 5, + 2 + ], + [ + 6, + 2 + ] + ] + } + ], + "meta": { + "seed": 4204071, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "contourComplexity": 8, + "connectedComponents": 1, + "fillRatio": 0.125, + "difficultyScore": 0.55, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 271, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-270/target.png", + "shapes": { + "S1": "../images/voi-270/shape_S1.png", + "S2": "../images/voi-270/shape_S2.png", + "S3": "../images/voi-270/shape_S3.png", + "S4": "../images/voi-270/shape_S4.png", + "S5": "../images/voi-270/shape_S5.png" + } + }, + "ID": "voi-270", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V3", + "grid": [ + 5, + 1 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V4", + "grid": [ + 4, + 2 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V3", + "grid": [ + 5, + 2 + ] + } + ] + }, + "legacy_answer": "S1 90 V3 [5,1]\nS2 0 V4 [4,2]\nS4 180 V3 [5,2]", + "solutionText": "S1 90 V3 [5,1]\nS2 0 V4 [4,2]\nS4 180 V3 [5,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-270\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S4: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-271.json b/voi/data/voi-271.json new file mode 100644 index 0000000000000000000000000000000000000000..15c3a856763927a298d6cfbfcd3b95cdd83dc994 --- /dev/null +++ b/voi/data/voi-271.json @@ -0,0 +1,221 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 8 + ], + [ + 3, + 5 + ], + [ + 5, + 5 + ], + [ + 5, + 8 + ] + ] + }, + { + "polygon": [ + [ + 7, + 4 + ], + [ + 7, + 5 + ], + [ + 6, + 5 + ], + [ + 6, + 4 + ] + ] + }, + { + "polygon": [ + [ + 4, + 4 + ], + [ + 7, + 4 + ], + [ + 7, + 5 + ], + [ + 4, + 5 + ] + ] + } + ], + "meta": { + "seed": 4204072, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "contourComplexity": 8, + "connectedComponents": 1, + "fillRatio": 0.125, + "difficultyScore": 0.55, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 272, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-271/target.png", + "shapes": { + "S1": "../images/voi-271/shape_S1.png", + "S2": "../images/voi-271/shape_S2.png", + "S3": "../images/voi-271/shape_S3.png", + "S4": "../images/voi-271/shape_S4.png", + "S5": "../images/voi-271/shape_S5.png" + } + }, + "ID": "voi-271", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V4", + "grid": [ + 5, + 8 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V4", + "grid": [ + 6, + 4 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V1", + "grid": [ + 4, + 4 + ] + } + ] + }, + "legacy_answer": "S1 90 V4 [5,8]\nS2 270 V4 [6,4]\nS3 0 V1 [4,4]", + "solutionText": "S1 90 V4 [5,8]\nS2 270 V4 [6,4]\nS3 0 V1 [4,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-271\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S3: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-272.json b/voi/data/voi-272.json new file mode 100644 index 0000000000000000000000000000000000000000..6f074e3e486354284d5f1bb43c468c24ac0d0931 --- /dev/null +++ b/voi/data/voi-272.json @@ -0,0 +1,201 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 0, + 8 + ], + [ + 0, + 5 + ], + [ + 2, + 5 + ], + [ + 2, + 8 + ] + ] + }, + { + "polygon": [ + [ + 3, + 6 + ], + [ + 3, + 8 + ], + [ + 1, + 6 + ] + ] + }, + { + "polygon": [ + [ + 1, + 8 + ], + [ + 0, + 8 + ], + [ + 1, + 7 + ] + ] + } + ], + "meta": { + "seed": 4204073, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.247273, + "contourComplexity": 104, + "connectedComponents": 1, + "fillRatio": 0.101074, + "difficultyScore": 0.408761, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 273, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-272/target.png", + "shapes": { + "S1": "../images/voi-272/shape_S1.png", + "S2": "../images/voi-272/shape_S2.png", + "S3": "../images/voi-272/shape_S3.png", + "S4": "../images/voi-272/shape_S4.png", + "S5": "../images/voi-272/shape_S5.png" + } + }, + "ID": "voi-272", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V4", + "grid": [ + 2, + 8 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V3", + "grid": [ + 1, + 6 + ] + }, + { + "shape": "S5", + "angle": 180, + "vertex": "V2", + "grid": [ + 0, + 8 + ] + } + ] + }, + "legacy_answer": "S1 90 V4 [2,8]\nS3 270 V3 [1,6]\nS5 180 V2 [0,8]", + "solutionText": "S1 90 V4 [2,8]\nS3 270 V3 [1,6]\nS5 180 V2 [0,8]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-272\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n- S5: V1=[0,0], V2=[1,0], V3=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-273.json b/voi/data/voi-273.json new file mode 100644 index 0000000000000000000000000000000000000000..1dbd3a595225ec02608a785984afb43f9ca366d2 --- /dev/null +++ b/voi/data/voi-273.json @@ -0,0 +1,241 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 1, + 5 + ], + [ + 1, + 3 + ], + [ + 2, + 3 + ], + [ + 2, + 5 + ] + ] + }, + { + "polygon": [ + [ + 4, + 2 + ], + [ + 4, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 3 + ], + [ + 1, + 3 + ], + [ + 1, + 2 + ] + ] + }, + { + "polygon": [ + [ + 4, + 4 + ], + [ + 4, + 5 + ], + [ + 1, + 5 + ], + [ + 1, + 4 + ] + ] + } + ], + "meta": { + "seed": 4204074, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "contourComplexity": 11, + "connectedComponents": 1, + "fillRatio": 0.109375, + "difficultyScore": 0.492361, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 274, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-273/target.png", + "shapes": { + "S1": "../images/voi-273/shape_S1.png", + "S2": "../images/voi-273/shape_S2.png", + "S3": "../images/voi-273/shape_S3.png", + "S4": "../images/voi-273/shape_S4.png", + "S5": "../images/voi-273/shape_S5.png" + } + }, + "ID": "voi-273", + "answer": { + "placements": [ + { + "shape": "S3", + "angle": 90, + "vertex": "V3", + "grid": [ + 2, + 3 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V6", + "grid": [ + 1, + 2 + ] + }, + { + "shape": "S5", + "angle": 270, + "vertex": "V1", + "grid": [ + 4, + 4 + ] + } + ] + }, + "legacy_answer": "S3 90 V3 [2,3]\nS4 270 V6 [1,2]\nS5 270 V1 [4,4]", + "solutionText": "S3 90 V3 [2,3]\nS4 270 V6 [1,2]\nS5 270 V1 [4,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-273\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S5: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-274.json b/voi/data/voi-274.json new file mode 100644 index 0000000000000000000000000000000000000000..43bd2e86561bb783010ab700dce5662484cf4281 --- /dev/null +++ b/voi/data/voi-274.json @@ -0,0 +1,261 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 5 + ], + [ + 6, + 5 + ], + [ + 6, + 6 + ], + [ + 5, + 6 + ], + [ + 5, + 8 + ], + [ + 4, + 8 + ] + ] + }, + { + "polygon": [ + [ + 3, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 7 + ], + [ + 3, + 7 + ] + ] + }, + { + "polygon": [ + [ + 2, + 8 + ], + [ + 2, + 6 + ], + [ + 4, + 6 + ], + [ + 4, + 8 + ] + ] + } + ], + "meta": { + "seed": 4204075, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.166667, + "contourComplexity": 15, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.620833, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 275, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-274/target.png", + "shapes": { + "S1": "../images/voi-274/shape_S1.png", + "S2": "../images/voi-274/shape_S2.png", + "S3": "../images/voi-274/shape_S3.png", + "S4": "../images/voi-274/shape_S4.png", + "S5": "../images/voi-274/shape_S5.png" + } + }, + "ID": "voi-274", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V4", + "grid": [ + 5, + 6 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V4", + "grid": [ + 4, + 5 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V2", + "grid": [ + 2, + 6 + ] + } + ] + }, + "legacy_answer": "S1 0 V4 [5,6]\nS3 0 V4 [4,5]\nS4 90 V2 [2,6]", + "solutionText": "S1 0 V4 [5,6]\nS3 0 V4 [4,5]\nS4 90 V2 [2,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-274\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-275.json b/voi/data/voi-275.json new file mode 100644 index 0000000000000000000000000000000000000000..31850212f9fad8bc8d536ece4177e2cc94b13274 --- /dev/null +++ b/voi/data/voi-275.json @@ -0,0 +1,221 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 7 + ], + [ + 1, + 7 + ], + [ + 2, + 6 + ], + [ + 4, + 6 + ] + ] + }, + { + "polygon": [ + [ + 3, + 6 + ], + [ + 1, + 6 + ], + [ + 1, + 4 + ], + [ + 3, + 4 + ] + ] + }, + { + "polygon": [ + [ + 5, + 4 + ], + [ + 5, + 7 + ], + [ + 3, + 7 + ], + [ + 3, + 4 + ] + ] + } + ], + "meta": { + "seed": 4204076, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.159601, + "contourComplexity": 40, + "connectedComponents": 1, + "fillRatio": 0.164551, + "difficultyScore": 0.632494, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 276, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-275/target.png", + "shapes": { + "S1": "../images/voi-275/shape_S1.png", + "S2": "../images/voi-275/shape_S2.png", + "S3": "../images/voi-275/shape_S3.png", + "S4": "../images/voi-275/shape_S4.png", + "S5": "../images/voi-275/shape_S5.png" + } + }, + "ID": "voi-275", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 180, + "vertex": "V4", + "grid": [ + 4, + 6 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V2", + "grid": [ + 1, + 6 + ] + }, + { + "shape": "S5", + "angle": 270, + "vertex": "V1", + "grid": [ + 5, + 4 + ] + } + ] + }, + "legacy_answer": "S2 180 V4 [4,6]\nS4 180 V2 [1,6]\nS5 270 V1 [5,4]", + "solutionText": "S2 180 V4 [4,6]\nS4 180 V2 [1,6]\nS5 270 V1 [5,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-275\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-276.json b/voi/data/voi-276.json new file mode 100644 index 0000000000000000000000000000000000000000..7ee728fa8ad66ac7828fb1e9df915085d5e86e75 --- /dev/null +++ b/voi/data/voi-276.json @@ -0,0 +1,229 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 3 + ], + [ + 7, + 3 + ], + [ + 7, + 4 + ], + [ + 6, + 4 + ], + [ + 6, + 6 + ], + [ + 5, + 6 + ] + ] + }, + { + "polygon": [ + [ + 6, + 7 + ], + [ + 5, + 7 + ], + [ + 5, + 5 + ], + [ + 6, + 5 + ] + ] + }, + { + "polygon": [ + [ + 6, + 7 + ], + [ + 6, + 4 + ], + [ + 7, + 4 + ], + [ + 7, + 7 + ] + ] + } + ], + "meta": { + "seed": 4204077, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "contourComplexity": 8, + "connectedComponents": 1, + "fillRatio": 0.109375, + "difficultyScore": 0.492361, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 277, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-276/target.png", + "shapes": { + "S1": "../images/voi-276/shape_S1.png", + "S2": "../images/voi-276/shape_S2.png", + "S3": "../images/voi-276/shape_S3.png", + "S4": "../images/voi-276/shape_S4.png", + "S5": "../images/voi-276/shape_S5.png" + } + }, + "ID": "voi-276", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 0, + "vertex": "V2", + "grid": [ + 7, + 3 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V4", + "grid": [ + 6, + 5 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V3", + "grid": [ + 7, + 4 + ] + } + ] + }, + "legacy_answer": "S2 0 V2 [7,3]\nS3 180 V4 [6,5]\nS5 90 V3 [7,4]", + "solutionText": "S2 0 V2 [7,3]\nS3 180 V4 [6,5]\nS5 90 V3 [7,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-276\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-277.json b/voi/data/voi-277.json new file mode 100644 index 0000000000000000000000000000000000000000..4df9a01b021321666f067b208c6230d5ed48a343 --- /dev/null +++ b/voi/data/voi-277.json @@ -0,0 +1,221 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 2 + ], + [ + 7, + 2 + ], + [ + 7, + 4 + ], + [ + 5, + 4 + ] + ] + }, + { + "polygon": [ + [ + 3, + 2 + ], + [ + 6, + 2 + ], + [ + 5, + 3 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 5, + 5 + ], + [ + 3, + 5 + ], + [ + 5, + 3 + ] + ] + } + ], + "meta": { + "seed": 4204078, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.123636, + "contourComplexity": 104, + "connectedComponents": 1, + "fillRatio": 0.117676, + "difficultyScore": 0.870103, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 278, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-277/target.png", + "shapes": { + "S1": "../images/voi-277/shape_S1.png", + "S2": "../images/voi-277/shape_S2.png", + "S3": "../images/voi-277/shape_S3.png", + "S4": "../images/voi-277/shape_S4.png", + "S5": "../images/voi-277/shape_S5.png" + } + }, + "ID": "voi-277", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V3", + "grid": [ + 7, + 4 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V1", + "grid": [ + 3, + 2 + ] + }, + { + "shape": "S5", + "angle": 180, + "vertex": "V2", + "grid": [ + 3, + 5 + ] + } + ] + }, + "legacy_answer": "S1 0 V3 [7,4]\nS2 0 V1 [3,2]\nS5 180 V2 [3,5]", + "solutionText": "S1 0 V3 [7,4]\nS2 0 V1 [3,2]\nS5 180 V2 [3,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-277\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S5: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-278.json b/voi/data/voi-278.json new file mode 100644 index 0000000000000000000000000000000000000000..a3911f93d209e4bb58cb231232961340d609d62e --- /dev/null +++ b/voi/data/voi-278.json @@ -0,0 +1,229 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 4 + ], + [ + 5, + 2 + ], + [ + 7, + 4 + ] + ] + }, + { + "polygon": [ + [ + 5, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 1 + ], + [ + 5, + 1 + ] + ] + }, + { + "polygon": [ + [ + 7, + 1 + ], + [ + 7, + 2 + ], + [ + 4, + 2 + ], + [ + 4, + 1 + ] + ] + } + ], + "meta": { + "seed": 4204079, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.22069, + "contourComplexity": 72, + "connectedComponents": 1, + "fillRatio": 0.110352, + "difficultyScore": 0.496538, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 279, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-278/target.png", + "shapes": { + "S1": "../images/voi-278/shape_S1.png", + "S2": "../images/voi-278/shape_S2.png", + "S3": "../images/voi-278/shape_S3.png", + "S4": "../images/voi-278/shape_S4.png", + "S5": "../images/voi-278/shape_S5.png" + } + }, + "ID": "voi-278", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 90, + "vertex": "V3", + "grid": [ + 7, + 4 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V2", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S5", + "angle": 270, + "vertex": "V3", + "grid": [ + 4, + 2 + ] + } + ] + }, + "legacy_answer": "S2 90 V3 [7,4]\nS3 180 V2 [3,4]\nS5 270 V3 [4,2]", + "solutionText": "S2 90 V3 [7,4]\nS3 180 V2 [3,4]\nS5 270 V3 [4,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-278\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S5: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-279.json b/voi/data/voi-279.json new file mode 100644 index 0000000000000000000000000000000000000000..4c23539f88216a1f16564e3b502239944ea1a211 --- /dev/null +++ b/voi/data/voi-279.json @@ -0,0 +1,213 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 7, + 1 + ], + [ + 7, + 2 + ], + [ + 4, + 2 + ], + [ + 4, + 1 + ] + ] + }, + { + "polygon": [ + [ + 3, + 4 + ], + [ + 3, + 1 + ], + [ + 5, + 1 + ], + [ + 5, + 4 + ] + ] + }, + { + "polygon": [ + [ + 5, + 2 + ], + [ + 4, + 2 + ], + [ + 5, + 1 + ] + ] + } + ], + "meta": { + "seed": 4204080, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.209836, + "contourComplexity": 38, + "connectedComponents": 1, + "fillRatio": 0.117676, + "difficultyScore": 0.525304, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 280, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-279/target.png", + "shapes": { + "S1": "../images/voi-279/shape_S1.png", + "S2": "../images/voi-279/shape_S2.png", + "S3": "../images/voi-279/shape_S3.png", + "S4": "../images/voi-279/shape_S4.png", + "S5": "../images/voi-279/shape_S5.png" + } + }, + "ID": "voi-279", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V4", + "grid": [ + 4, + 1 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V1", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V2", + "grid": [ + 4, + 2 + ] + } + ] + }, + "legacy_answer": "S1 270 V4 [4,1]\nS2 90 V1 [3,4]\nS4 180 V2 [4,2]", + "solutionText": "S1 270 V4 [4,1]\nS2 90 V1 [3,4]\nS4 180 V2 [4,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-279\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[0,1]\n- S5: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-280.json b/voi/data/voi-280.json new file mode 100644 index 0000000000000000000000000000000000000000..a234074a197079274c48a79ad97f9c39248d9b3f --- /dev/null +++ b/voi/data/voi-280.json @@ -0,0 +1,225 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 8 + ], + [ + 3, + 8 + ], + [ + 3, + 5 + ], + [ + 4, + 5 + ] + ] + }, + { + "polygon": [ + [ + 2, + 6 + ], + [ + 3, + 6 + ], + [ + 3, + 7 + ], + [ + 2, + 7 + ] + ] + }, + { + "polygon": [ + [ + 2, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 6 + ], + [ + 2, + 6 + ] + ] + } + ], + "meta": { + "seed": 4204081, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "contourComplexity": 12, + "connectedComponents": 1, + "fillRatio": 0.125, + "difficultyScore": 0.55, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 281, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-280/target.png", + "shapes": { + "S1": "../images/voi-280/shape_S1.png", + "S2": "../images/voi-280/shape_S2.png", + "S3": "../images/voi-280/shape_S3.png", + "S4": "../images/voi-280/shape_S4.png", + "S5": "../images/voi-280/shape_S5.png" + } + }, + "ID": "voi-280", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V3", + "grid": [ + 3, + 5 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V4", + "grid": [ + 2, + 7 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V3", + "grid": [ + 5, + 6 + ] + } + ] + }, + "legacy_answer": "S1 180 V3 [3,5]\nS3 0 V4 [2,7]\nS5 0 V3 [5,6]", + "solutionText": "S1 180 V3 [3,5]\nS3 0 V4 [2,7]\nS5 0 V3 [5,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-280\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-281.json b/voi/data/voi-281.json new file mode 100644 index 0000000000000000000000000000000000000000..5e5dd3699e4c44369fcd6502fd151262011e2976 --- /dev/null +++ b/voi/data/voi-281.json @@ -0,0 +1,221 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 6 + ], + [ + 2, + 6 + ], + [ + 2, + 4 + ], + [ + 5, + 4 + ] + ] + }, + { + "polygon": [ + [ + 3, + 4 + ], + [ + 0, + 4 + ], + [ + 0, + 3 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 2, + 3 + ], + [ + 2, + 5 + ], + [ + 0, + 5 + ], + [ + 0, + 3 + ] + ] + } + ], + "meta": { + "seed": 4204082, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.307692, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.549519, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 282, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-281/target.png", + "shapes": { + "S1": "../images/voi-281/shape_S1.png", + "S2": "../images/voi-281/shape_S2.png", + "S3": "../images/voi-281/shape_S3.png", + "S4": "../images/voi-281/shape_S4.png", + "S5": "../images/voi-281/shape_S5.png" + } + }, + "ID": "voi-281", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V3", + "grid": [ + 2, + 4 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V3", + "grid": [ + 0, + 3 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V2", + "grid": [ + 2, + 5 + ] + } + ] + }, + "legacy_answer": "S1 180 V3 [2,4]\nS2 180 V3 [0,3]\nS4 270 V2 [2,5]", + "solutionText": "S1 180 V3 [2,4]\nS2 180 V3 [0,3]\nS4 270 V2 [2,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-281\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S3: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-282.json b/voi/data/voi-282.json new file mode 100644 index 0000000000000000000000000000000000000000..02adcb5a161af9d5fe601776ba8589d16c4cb419 --- /dev/null +++ b/voi/data/voi-282.json @@ -0,0 +1,229 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 7, + 1 + ], + [ + 7, + 0 + ], + [ + 8, + 0 + ], + [ + 8, + 1 + ] + ] + }, + { + "polygon": [ + [ + 5, + 0 + ], + [ + 8, + 0 + ], + [ + 8, + 2 + ], + [ + 5, + 2 + ] + ] + }, + { + "polygon": [ + [ + 8, + 3 + ], + [ + 5, + 3 + ], + [ + 6, + 2 + ], + [ + 8, + 2 + ] + ] + } + ], + "meta": { + "seed": 4204083, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.209836, + "contourComplexity": 38, + "connectedComponents": 1, + "fillRatio": 0.117676, + "difficultyScore": 0.525304, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 283, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-282/target.png", + "shapes": { + "S1": "../images/voi-282/shape_S1.png", + "S2": "../images/voi-282/shape_S2.png", + "S3": "../images/voi-282/shape_S3.png", + "S4": "../images/voi-282/shape_S4.png", + "S5": "../images/voi-282/shape_S5.png" + } + }, + "ID": "voi-282", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V3", + "grid": [ + 8, + 0 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V2", + "grid": [ + 8, + 0 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V1", + "grid": [ + 8, + 3 + ] + } + ] + }, + "legacy_answer": "S1 90 V3 [8,0]\nS2 0 V2 [8,0]\nS3 180 V1 [8,3]", + "solutionText": "S1 90 V3 [8,0]\nS2 0 V2 [8,0]\nS3 180 V1 [8,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-282\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-283.json b/voi/data/voi-283.json new file mode 100644 index 0000000000000000000000000000000000000000..811c96c67082f685710e72e3e06cb894b28a3d79 --- /dev/null +++ b/voi/data/voi-283.json @@ -0,0 +1,221 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 1 + ], + [ + 3, + 1 + ], + [ + 3, + 2 + ], + [ + 2, + 2 + ] + ] + }, + { + "polygon": [ + [ + 5, + 2 + ], + [ + 2, + 2 + ], + [ + 2, + 0 + ], + [ + 5, + 0 + ] + ] + }, + { + "polygon": [ + [ + 2, + 3 + ], + [ + 2, + 0 + ], + [ + 3, + 1 + ], + [ + 3, + 3 + ] + ] + } + ], + "meta": { + "seed": 4204084, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.321311, + "contourComplexity": 38, + "connectedComponents": 1, + "fillRatio": 0.101074, + "difficultyScore": 0.683097, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 284, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-283/target.png", + "shapes": { + "S1": "../images/voi-283/shape_S1.png", + "S2": "../images/voi-283/shape_S2.png", + "S3": "../images/voi-283/shape_S3.png", + "S4": "../images/voi-283/shape_S4.png", + "S5": "../images/voi-283/shape_S5.png" + } + }, + "ID": "voi-283", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V2", + "grid": [ + 3, + 1 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V1", + "grid": [ + 5, + 2 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V3", + "grid": [ + 3, + 1 + ] + } + ] + }, + "legacy_answer": "S1 0 V2 [3,1]\nS3 180 V1 [5,2]\nS4 90 V3 [3,1]", + "solutionText": "S1 0 V2 [3,1]\nS3 180 V1 [5,2]\nS4 90 V3 [3,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-283\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S5: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-284.json b/voi/data/voi-284.json new file mode 100644 index 0000000000000000000000000000000000000000..f67310b5a96d9b0de0725e37a1146dca89b74eac --- /dev/null +++ b/voi/data/voi-284.json @@ -0,0 +1,237 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 8 + ], + [ + 1, + 8 + ], + [ + 1, + 6 + ], + [ + 3, + 6 + ] + ] + }, + { + "polygon": [ + [ + 1, + 5 + ], + [ + 2, + 5 + ], + [ + 2, + 8 + ], + [ + 1, + 8 + ] + ] + }, + { + "polygon": [ + [ + 2, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 6 + ], + [ + 2, + 6 + ] + ] + } + ], + "meta": { + "seed": 4204085, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.363636, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.109375, + "difficultyScore": 0.835795, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 285, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-284/target.png", + "shapes": { + "S1": "../images/voi-284/shape_S1.png", + "S2": "../images/voi-284/shape_S2.png", + "S3": "../images/voi-284/shape_S3.png", + "S4": "../images/voi-284/shape_S4.png", + "S5": "../images/voi-284/shape_S5.png" + } + }, + "ID": "voi-284", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V2", + "grid": [ + 1, + 8 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V1", + "grid": [ + 1, + 5 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V1", + "grid": [ + 2, + 3 + ] + } + ] + }, + "legacy_answer": "S1 180 V2 [1,8]\nS3 0 V1 [1,5]\nS5 0 V1 [2,3]", + "solutionText": "S1 180 V2 [1,8]\nS3 0 V1 [1,5]\nS5 0 V1 [2,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-284\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S4: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-285.json b/voi/data/voi-285.json new file mode 100644 index 0000000000000000000000000000000000000000..85569e1eadabcb638e09cb302aeb886825eb759a --- /dev/null +++ b/voi/data/voi-285.json @@ -0,0 +1,217 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 7 + ], + [ + 3, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 7 + ] + ] + }, + { + "polygon": [ + [ + 3, + 8 + ], + [ + 2, + 8 + ], + [ + 2, + 7 + ], + [ + 3, + 7 + ] + ] + }, + { + "polygon": [ + [ + 5, + 8 + ], + [ + 2, + 8 + ], + [ + 2, + 7 + ], + [ + 5, + 7 + ] + ] + } + ], + "meta": { + "seed": 4204086, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "contourComplexity": 4, + "connectedComponents": 1, + "fillRatio": 0.125, + "difficultyScore": 0.55, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 286, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-285/target.png", + "shapes": { + "S1": "../images/voi-285/shape_S1.png", + "S2": "../images/voi-285/shape_S2.png", + "S3": "../images/voi-285/shape_S3.png", + "S4": "../images/voi-285/shape_S4.png", + "S5": "../images/voi-285/shape_S5.png" + } + }, + "ID": "voi-285", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V3", + "grid": [ + 5, + 4 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V4", + "grid": [ + 3, + 7 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V3", + "grid": [ + 2, + 7 + ] + } + ] + }, + "legacy_answer": "S1 90 V3 [5,4]\nS2 180 V4 [3,7]\nS3 180 V3 [2,7]", + "solutionText": "S1 90 V3 [5,4]\nS2 180 V4 [3,7]\nS3 180 V3 [2,7]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-285\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S3: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n- S5: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-286.json b/voi/data/voi-286.json new file mode 100644 index 0000000000000000000000000000000000000000..f00cbc13b59b737c1c312f1a2b16183ed7daa512 --- /dev/null +++ b/voi/data/voi-286.json @@ -0,0 +1,213 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 5 + ], + [ + 2, + 2 + ], + [ + 4, + 2 + ], + [ + 4, + 5 + ] + ] + }, + { + "polygon": [ + [ + 3, + 1 + ], + [ + 3, + 3 + ], + [ + 2, + 3 + ], + [ + 2, + 1 + ] + ] + }, + { + "polygon": [ + [ + 5, + 1 + ], + [ + 5, + 3 + ], + [ + 3, + 1 + ] + ] + } + ], + "meta": { + "seed": 4204087, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.198758, + "contourComplexity": 72, + "connectedComponents": 1, + "fillRatio": 0.125977, + "difficultyScore": 0.553016, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 287, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-286/target.png", + "shapes": { + "S1": "../images/voi-286/shape_S1.png", + "S2": "../images/voi-286/shape_S2.png", + "S3": "../images/voi-286/shape_S3.png", + "S4": "../images/voi-286/shape_S4.png", + "S5": "../images/voi-286/shape_S5.png" + } + }, + "ID": "voi-286", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 90, + "vertex": "V3", + "grid": [ + 4, + 2 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V1", + "grid": [ + 3, + 1 + ] + }, + { + "shape": "S5", + "angle": 270, + "vertex": "V1", + "grid": [ + 5, + 1 + ] + } + ] + }, + "legacy_answer": "S2 90 V3 [4,2]\nS4 270 V1 [3,1]\nS5 270 V1 [5,1]", + "solutionText": "S2 90 V3 [4,2]\nS4 270 V1 [3,1]\nS5 270 V1 [5,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-286\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S5: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-287.json b/voi/data/voi-287.json new file mode 100644 index 0000000000000000000000000000000000000000..b0d6e145c607b8220862f68af96c0930d95f9615 --- /dev/null +++ b/voi/data/voi-287.json @@ -0,0 +1,221 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 6 + ], + [ + 7, + 6 + ], + [ + 7, + 7 + ], + [ + 6, + 7 + ] + ] + }, + { + "polygon": [ + [ + 5, + 7 + ], + [ + 5, + 5 + ], + [ + 7, + 5 + ], + [ + 7, + 7 + ] + ] + }, + { + "polygon": [ + [ + 8, + 5 + ], + [ + 6, + 5 + ], + [ + 6, + 3 + ], + [ + 8, + 3 + ] + ] + } + ], + "meta": { + "seed": 4204088, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.109375, + "difficultyScore": 0.492361, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 288, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-287/target.png", + "shapes": { + "S1": "../images/voi-287/shape_S1.png", + "S2": "../images/voi-287/shape_S2.png", + "S3": "../images/voi-287/shape_S3.png", + "S4": "../images/voi-287/shape_S4.png", + "S5": "../images/voi-287/shape_S5.png" + } + }, + "ID": "voi-287", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V1", + "grid": [ + 6, + 6 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V1", + "grid": [ + 5, + 7 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V1", + "grid": [ + 8, + 5 + ] + } + ] + }, + "legacy_answer": "S1 0 V1 [6,6]\nS3 90 V1 [5,7]\nS4 180 V1 [8,5]", + "solutionText": "S1 0 V1 [6,6]\nS3 90 V1 [5,7]\nS4 180 V1 [8,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-287\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S2: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-288.json b/voi/data/voi-288.json new file mode 100644 index 0000000000000000000000000000000000000000..36aa92d32f3f36cc9a56469b0bc5915272a8bba4 --- /dev/null +++ b/voi/data/voi-288.json @@ -0,0 +1,229 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 4 + ], + [ + 2, + 2 + ], + [ + 4, + 2 + ], + [ + 4, + 4 + ] + ] + }, + { + "polygon": [ + [ + 2, + 5 + ], + [ + 2, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 5 + ] + ] + }, + { + "polygon": [ + [ + 2, + 0 + ], + [ + 4, + 0 + ], + [ + 2, + 2 + ] + ] + } + ], + "meta": { + "seed": 4204089, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.198758, + "contourComplexity": 74, + "connectedComponents": 1, + "fillRatio": 0.125977, + "difficultyScore": 0.553016, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 289, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-288/target.png", + "shapes": { + "S1": "../images/voi-288/shape_S1.png", + "S2": "../images/voi-288/shape_S2.png", + "S3": "../images/voi-288/shape_S3.png", + "S4": "../images/voi-288/shape_S4.png", + "S5": "../images/voi-288/shape_S5.png" + } + }, + "ID": "voi-288", + "answer": { + "placements": [ + { + "shape": "S3", + "angle": 90, + "vertex": "V1", + "grid": [ + 2, + 4 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V6", + "grid": [ + 5, + 5 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V1", + "grid": [ + 2, + 0 + ] + } + ] + }, + "legacy_answer": "S3 90 V1 [2,4]\nS4 90 V6 [5,5]\nS5 0 V1 [2,0]", + "solutionText": "S3 90 V1 [2,4]\nS4 90 V6 [5,5]\nS5 0 V1 [2,0]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-288\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S5: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-289.json b/voi/data/voi-289.json new file mode 100644 index 0000000000000000000000000000000000000000..28d10a171ca11a5450b456fbe4ddc964ce714543 --- /dev/null +++ b/voi/data/voi-289.json @@ -0,0 +1,229 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 4 + ], + [ + 6, + 1 + ], + [ + 8, + 1 + ], + [ + 8, + 4 + ] + ] + }, + { + "polygon": [ + [ + 7, + 1 + ], + [ + 8, + 1 + ], + [ + 8, + 3 + ], + [ + 7, + 3 + ] + ] + }, + { + "polygon": [ + [ + 6, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 2 + ], + [ + 6, + 2 + ] + ] + } + ], + "meta": { + "seed": 4204090, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "contourComplexity": 8, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.430357, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 290, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-289/target.png", + "shapes": { + "S1": "../images/voi-289/shape_S1.png", + "S2": "../images/voi-289/shape_S2.png", + "S3": "../images/voi-289/shape_S3.png", + "S4": "../images/voi-289/shape_S4.png", + "S5": "../images/voi-289/shape_S5.png" + } + }, + "ID": "voi-289", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V2", + "grid": [ + 6, + 1 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V4", + "grid": [ + 7, + 3 + ] + }, + { + "shape": "S5", + "angle": 180, + "vertex": "V4", + "grid": [ + 6, + 2 + ] + } + ] + }, + "legacy_answer": "S1 90 V2 [6,1]\nS2 0 V4 [7,3]\nS5 180 V4 [6,2]", + "solutionText": "S1 90 V2 [6,1]\nS2 0 V4 [7,3]\nS5 180 V4 [6,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-289\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-290.json b/voi/data/voi-290.json new file mode 100644 index 0000000000000000000000000000000000000000..731951bcf191264a3621ab1e60d26273f9471b1e --- /dev/null +++ b/voi/data/voi-290.json @@ -0,0 +1,221 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 2 + ], + [ + 5, + 3 + ], + [ + 2, + 3 + ], + [ + 2, + 2 + ] + ] + }, + { + "polygon": [ + [ + 5, + 3 + ], + [ + 5, + 6 + ], + [ + 3, + 6 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 3, + 2 + ], + [ + 3, + 5 + ], + [ + 2, + 4 + ], + [ + 2, + 2 + ] + ] + } + ], + "meta": { + "seed": 4204091, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.173442, + "contourComplexity": 38, + "connectedComponents": 1, + "fillRatio": 0.148926, + "difficultyScore": 0.608381, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 291, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-290/target.png", + "shapes": { + "S1": "../images/voi-290/shape_S1.png", + "S2": "../images/voi-290/shape_S2.png", + "S3": "../images/voi-290/shape_S3.png", + "S4": "../images/voi-290/shape_S4.png", + "S5": "../images/voi-290/shape_S5.png" + } + }, + "ID": "voi-290", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V2", + "grid": [ + 5, + 3 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V4", + "grid": [ + 3, + 3 + ] + }, + { + "shape": "S5", + "angle": 270, + "vertex": "V4", + "grid": [ + 2, + 2 + ] + } + ] + }, + "legacy_answer": "S1 270 V2 [5,3]\nS4 270 V4 [3,3]\nS5 270 V4 [2,2]", + "solutionText": "S1 270 V2 [5,3]\nS4 270 V4 [3,3]\nS5 270 V4 [2,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-290\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S2: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-291.json b/voi/data/voi-291.json new file mode 100644 index 0000000000000000000000000000000000000000..288100826fda0dcd5f7fa83b644f6b28b09a2f74 --- /dev/null +++ b/voi/data/voi-291.json @@ -0,0 +1,237 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 1 + ], + [ + 2, + 4 + ], + [ + 0, + 4 + ], + [ + 0, + 1 + ] + ] + }, + { + "polygon": [ + [ + 0, + 8 + ], + [ + 0, + 5 + ], + [ + 2, + 5 + ], + [ + 2, + 8 + ] + ] + }, + { + "polygon": [ + [ + 0, + 4 + ], + [ + 2, + 4 + ], + [ + 2, + 5 + ], + [ + 1, + 5 + ], + [ + 1, + 7 + ], + [ + 0, + 7 + ] + ] + } + ], + "meta": { + "seed": 4204092, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.25, + "contourComplexity": 8, + "connectedComponents": 1, + "fillRatio": 0.1875, + "difficultyScore": 0.225, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 292, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-291/target.png", + "shapes": { + "S1": "../images/voi-291/shape_S1.png", + "S2": "../images/voi-291/shape_S2.png", + "S3": "../images/voi-291/shape_S3.png", + "S4": "../images/voi-291/shape_S4.png", + "S5": "../images/voi-291/shape_S5.png" + } + }, + "ID": "voi-291", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V4", + "grid": [ + 0, + 1 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V1", + "grid": [ + 0, + 8 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V1", + "grid": [ + 0, + 4 + ] + } + ] + }, + "legacy_answer": "S1 270 V4 [0,1]\nS3 90 V1 [0,8]\nS4 0 V1 [0,4]", + "solutionText": "S1 270 V4 [0,1]\nS3 90 V1 [0,8]\nS4 0 V1 [0,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-291\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-292.json b/voi/data/voi-292.json new file mode 100644 index 0000000000000000000000000000000000000000..8dbe55b672e8963d072b5e917fa85c8abc5c3fb4 --- /dev/null +++ b/voi/data/voi-292.json @@ -0,0 +1,221 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 0 + ], + [ + 3, + 0 + ], + [ + 3, + 1 + ], + [ + 2, + 1 + ] + ] + }, + { + "polygon": [ + [ + 2, + 3 + ], + [ + 2, + 0 + ], + [ + 4, + 0 + ], + [ + 4, + 3 + ] + ] + }, + { + "polygon": [ + [ + 6, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 3 + ], + [ + 6, + 3 + ] + ] + } + ], + "meta": { + "seed": 4204093, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.125, + "difficultyScore": 0.55, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 293, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-292/target.png", + "shapes": { + "S1": "../images/voi-292/shape_S1.png", + "S2": "../images/voi-292/shape_S2.png", + "S3": "../images/voi-292/shape_S3.png", + "S4": "../images/voi-292/shape_S4.png", + "S5": "../images/voi-292/shape_S5.png" + } + }, + "ID": "voi-292", + "answer": { + "placements": [ + { + "shape": "S3", + "angle": 0, + "vertex": "V3", + "grid": [ + 3, + 1 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V4", + "grid": [ + 4, + 3 + ] + }, + { + "shape": "S5", + "angle": 180, + "vertex": "V1", + "grid": [ + 6, + 4 + ] + } + ] + }, + "legacy_answer": "S3 0 V3 [3,1]\nS4 90 V4 [4,3]\nS5 180 V1 [6,4]", + "solutionText": "S3 0 V3 [3,1]\nS4 90 V4 [4,3]\nS5 180 V1 [6,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-292\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S3: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-293.json b/voi/data/voi-293.json new file mode 100644 index 0000000000000000000000000000000000000000..0aafa84f8b145f21f1cdf76567b67653b93ed4c2 --- /dev/null +++ b/voi/data/voi-293.json @@ -0,0 +1,213 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 6 + ], + [ + 2, + 6 + ] + ] + }, + { + "polygon": [ + [ + 1, + 4 + ], + [ + 3, + 4 + ], + [ + 1, + 6 + ] + ] + }, + { + "polygon": [ + [ + 3, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 6 + ], + [ + 3, + 6 + ] + ] + } + ], + "meta": { + "seed": 4204094, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.131783, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.109375, + "difficultyScore": 0.854118, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 294, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-293/target.png", + "shapes": { + "S1": "../images/voi-293/shape_S1.png", + "S2": "../images/voi-293/shape_S2.png", + "S3": "../images/voi-293/shape_S3.png", + "S4": "../images/voi-293/shape_S4.png", + "S5": "../images/voi-293/shape_S5.png" + } + }, + "ID": "voi-293", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V4", + "grid": [ + 2, + 6 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V2", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V3", + "grid": [ + 5, + 6 + ] + } + ] + }, + "legacy_answer": "S1 0 V4 [2,6]\nS3 0 V2 [3,4]\nS5 0 V3 [5,6]", + "solutionText": "S1 0 V4 [2,6]\nS3 0 V2 [3,4]\nS5 0 V3 [5,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-293\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-294.json b/voi/data/voi-294.json new file mode 100644 index 0000000000000000000000000000000000000000..2cc542f663d9ba7db6622a49a8841cd50749b5fc --- /dev/null +++ b/voi/data/voi-294.json @@ -0,0 +1,213 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 0 + ], + [ + 8, + 0 + ], + [ + 8, + 2 + ], + [ + 5, + 2 + ] + ] + }, + { + "polygon": [ + [ + 6, + 3 + ], + [ + 6, + 1 + ], + [ + 8, + 3 + ] + ] + }, + { + "polygon": [ + [ + 6, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 1 + ], + [ + 6, + 1 + ] + ] + } + ], + "meta": { + "seed": 4204095, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.217778, + "contourComplexity": 73, + "connectedComponents": 1, + "fillRatio": 0.171875, + "difficultyScore": 0.385139, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 295, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-294/target.png", + "shapes": { + "S1": "../images/voi-294/shape_S1.png", + "S2": "../images/voi-294/shape_S2.png", + "S3": "../images/voi-294/shape_S3.png", + "S4": "../images/voi-294/shape_S4.png", + "S5": "../images/voi-294/shape_S5.png" + } + }, + "ID": "voi-294", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 0, + "vertex": "V4", + "grid": [ + 5, + 2 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V1", + "grid": [ + 6, + 3 + ] + }, + { + "shape": "S5", + "angle": 180, + "vertex": "V4", + "grid": [ + 6, + 1 + ] + } + ] + }, + "legacy_answer": "S2 0 V4 [5,2]\nS4 90 V1 [6,3]\nS5 180 V4 [6,1]", + "solutionText": "S2 0 V4 [5,2]\nS4 90 V1 [6,3]\nS5 180 V4 [6,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-294\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-295.json b/voi/data/voi-295.json new file mode 100644 index 0000000000000000000000000000000000000000..9f420dd6d4d52cda53f4128bdc8923fe686068c7 --- /dev/null +++ b/voi/data/voi-295.json @@ -0,0 +1,213 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 7, + 7 + ], + [ + 5, + 7 + ], + [ + 7, + 5 + ] + ] + }, + { + "polygon": [ + [ + 6, + 6 + ], + [ + 3, + 6 + ], + [ + 3, + 4 + ], + [ + 6, + 4 + ] + ] + }, + { + "polygon": [ + [ + 5, + 4 + ], + [ + 6, + 4 + ], + [ + 6, + 5 + ], + [ + 5, + 5 + ] + ] + } + ], + "meta": { + "seed": 4204096, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.22069, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.110352, + "difficultyScore": 0.496538, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 296, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-295/target.png", + "shapes": { + "S1": "../images/voi-295/shape_S1.png", + "S2": "../images/voi-295/shape_S2.png", + "S3": "../images/voi-295/shape_S3.png", + "S4": "../images/voi-295/shape_S4.png", + "S5": "../images/voi-295/shape_S5.png" + } + }, + "ID": "voi-295", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V3", + "grid": [ + 7, + 5 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V1", + "grid": [ + 6, + 6 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V4", + "grid": [ + 5, + 5 + ] + } + ] + }, + "legacy_answer": "S1 180 V3 [7,5]\nS2 180 V1 [6,6]\nS4 0 V4 [5,5]", + "solutionText": "S1 180 V3 [7,5]\nS2 180 V1 [6,6]\nS4 0 V4 [5,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-295\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S4: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-296.json b/voi/data/voi-296.json new file mode 100644 index 0000000000000000000000000000000000000000..2d560b55f1280b1984e8e0cb3fbca64397a8c3fc --- /dev/null +++ b/voi/data/voi-296.json @@ -0,0 +1,237 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 5 + ], + [ + 5, + 5 + ], + [ + 5, + 7 + ], + [ + 2, + 7 + ] + ] + }, + { + "polygon": [ + [ + 2, + 2 + ], + [ + 4, + 2 + ], + [ + 4, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 5 + ], + [ + 2, + 5 + ] + ] + }, + { + "polygon": [ + [ + 4, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 2 + ], + [ + 4, + 2 + ] + ] + } + ], + "meta": { + "seed": 4204097, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "contourComplexity": 6, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.591477, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 297, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-296/target.png", + "shapes": { + "S1": "../images/voi-296/shape_S1.png", + "S2": "../images/voi-296/shape_S2.png", + "S3": "../images/voi-296/shape_S3.png", + "S4": "../images/voi-296/shape_S4.png", + "S5": "../images/voi-296/shape_S5.png" + } + }, + "ID": "voi-296", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 0, + "vertex": "V1", + "grid": [ + 2, + 5 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V2", + "grid": [ + 4, + 2 + ] + }, + { + "shape": "S5", + "angle": 180, + "vertex": "V3", + "grid": [ + 3, + 2 + ] + } + ] + }, + "legacy_answer": "S2 0 V1 [2,5]\nS4 0 V2 [4,2]\nS5 180 V3 [3,2]", + "solutionText": "S2 0 V1 [2,5]\nS4 0 V2 [4,2]\nS5 180 V3 [3,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-296\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S5: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-297.json b/voi/data/voi-297.json new file mode 100644 index 0000000000000000000000000000000000000000..f99c383c0812ff58a3630206aff189cd45d98422 --- /dev/null +++ b/voi/data/voi-297.json @@ -0,0 +1,221 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 8, + 2 + ], + [ + 8, + 3 + ], + [ + 6, + 3 + ], + [ + 6, + 2 + ] + ] + }, + { + "polygon": [ + [ + 5, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 2 + ], + [ + 5, + 2 + ] + ] + }, + { + "polygon": [ + [ + 6, + 2 + ], + [ + 6, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 2 + ] + ] + } + ], + "meta": { + "seed": 4204098, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "contourComplexity": 8, + "connectedComponents": 1, + "fillRatio": 0.109375, + "difficultyScore": 0.492361, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 298, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-297/target.png", + "shapes": { + "S1": "../images/voi-297/shape_S1.png", + "S2": "../images/voi-297/shape_S2.png", + "S3": "../images/voi-297/shape_S3.png", + "S4": "../images/voi-297/shape_S4.png", + "S5": "../images/voi-297/shape_S5.png" + } + }, + "ID": "voi-297", + "answer": { + "placements": [ + { + "shape": "S3", + "angle": 270, + "vertex": "V2", + "grid": [ + 8, + 3 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V4", + "grid": [ + 5, + 2 + ] + }, + { + "shape": "S5", + "angle": 270, + "vertex": "V4", + "grid": [ + 4, + 2 + ] + } + ] + }, + "legacy_answer": "S3 270 V2 [8,3]\nS4 180 V4 [5,2]\nS5 270 V4 [4,2]", + "solutionText": "S3 270 V2 [8,3]\nS4 180 V4 [5,2]\nS5 270 V4 [4,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-297\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-298.json b/voi/data/voi-298.json new file mode 100644 index 0000000000000000000000000000000000000000..59a490c4c644dbc416765d1d8bc1734c8efee1e8 --- /dev/null +++ b/voi/data/voi-298.json @@ -0,0 +1,213 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 2 + ], + [ + 2, + 1 + ], + [ + 5, + 1 + ], + [ + 5, + 2 + ] + ] + }, + { + "polygon": [ + [ + 3, + 4 + ], + [ + 3, + 2 + ], + [ + 5, + 4 + ] + ] + }, + { + "polygon": [ + [ + 5, + 3 + ], + [ + 2, + 3 + ], + [ + 3, + 2 + ], + [ + 5, + 2 + ] + ] + } + ], + "meta": { + "seed": 4204099, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.139918, + "contourComplexity": 104, + "connectedComponents": 1, + "fillRatio": 0.102051, + "difficultyScore": 0.836228, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 299, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-298/target.png", + "shapes": { + "S1": "../images/voi-298/shape_S1.png", + "S2": "../images/voi-298/shape_S2.png", + "S3": "../images/voi-298/shape_S3.png", + "S4": "../images/voi-298/shape_S4.png", + "S5": "../images/voi-298/shape_S5.png" + } + }, + "ID": "voi-298", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V1", + "grid": [ + 2, + 2 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V2", + "grid": [ + 3, + 2 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V3", + "grid": [ + 3, + 2 + ] + } + ] + }, + "legacy_answer": "S1 90 V1 [2,2]\nS2 90 V2 [3,2]\nS3 180 V3 [3,2]", + "solutionText": "S1 90 V1 [2,2]\nS2 90 V2 [3,2]\nS3 180 V3 [3,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-298\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-299.json b/voi/data/voi-299.json new file mode 100644 index 0000000000000000000000000000000000000000..fbbf6a05341eb17b8908491ed700b1090a6a3519 --- /dev/null +++ b/voi/data/voi-299.json @@ -0,0 +1,213 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 4 + ], + [ + 4, + 7 + ], + [ + 2, + 7 + ], + [ + 2, + 4 + ] + ] + }, + { + "polygon": [ + [ + 1, + 8 + ], + [ + 1, + 6 + ], + [ + 3, + 8 + ] + ] + }, + { + "polygon": [ + [ + 3, + 8 + ], + [ + 3, + 5 + ], + [ + 5, + 5 + ], + [ + 5, + 8 + ] + ] + } + ], + "meta": { + "seed": 4204100, + "requiredShapeCount": 3, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.284444, + "contourComplexity": 74, + "connectedComponents": 1, + "fillRatio": 0.157227, + "difficultyScore": 0.423325, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 300, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-299/target.png", + "shapes": { + "S1": "../images/voi-299/shape_S1.png", + "S2": "../images/voi-299/shape_S2.png", + "S3": "../images/voi-299/shape_S3.png", + "S4": "../images/voi-299/shape_S4.png", + "S5": "../images/voi-299/shape_S5.png" + } + }, + "ID": "voi-299", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 270, + "vertex": "V3", + "grid": [ + 2, + 7 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V2", + "grid": [ + 1, + 6 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V3", + "grid": [ + 5, + 5 + ] + } + ] + }, + "legacy_answer": "S2 270 V3 [2,7]\nS4 90 V2 [1,6]\nS5 90 V3 [5,5]", + "solutionText": "S2 270 V3 [2,7]\nS4 90 V2 [1,6]\nS5 90 V3 [5,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-299\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-300.json b/voi/data/voi-300.json new file mode 100644 index 0000000000000000000000000000000000000000..614b3874d816a52829ea7314ca25c32b52164480 --- /dev/null +++ b/voi/data/voi-300.json @@ -0,0 +1,261 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 7 + ], + [ + 5, + 7 + ], + [ + 5, + 8 + ], + [ + 4, + 8 + ] + ] + }, + { + "polygon": [ + [ + 5, + 5 + ], + [ + 5, + 4 + ], + [ + 6, + 4 + ], + [ + 6, + 5 + ] + ] + }, + { + "polygon": [ + [ + 5, + 5 + ], + [ + 4, + 5 + ], + [ + 5, + 4 + ] + ] + }, + { + "polygon": [ + [ + 6, + 5 + ], + [ + 6, + 8 + ], + [ + 4, + 8 + ], + [ + 4, + 5 + ] + ] + } + ], + "meta": { + "seed": 4205001, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.234432, + "contourComplexity": 36, + "connectedComponents": 1, + "fillRatio": 0.102051, + "difficultyScore": 0.558169, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 301, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-300/target.png", + "shapes": { + "S1": "../images/voi-300/shape_S1.png", + "S2": "../images/voi-300/shape_S2.png", + "S3": "../images/voi-300/shape_S3.png", + "S4": "../images/voi-300/shape_S4.png", + "S5": "../images/voi-300/shape_S5.png", + "S6": "../images/voi-300/shape_S6.png" + } + }, + "ID": "voi-300", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 0, + "vertex": "V1", + "grid": [ + 4, + 7 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V1", + "grid": [ + 5, + 5 + ] + }, + { + "shape": "S5", + "angle": 180, + "vertex": "V3", + "grid": [ + 5, + 4 + ] + }, + { + "shape": "S6", + "angle": 270, + "vertex": "V4", + "grid": [ + 4, + 5 + ] + } + ] + }, + "legacy_answer": "S2 0 V1 [4,7]\nS4 90 V1 [5,5]\nS5 180 V3 [5,4]\nS6 270 V4 [4,5]", + "solutionText": "S2 0 V1 [4,7]\nS4 90 V1 [5,5]\nS5 180 V3 [5,4]\nS6 270 V4 [4,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-300\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S3: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S4: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S5: V1=[0,0], V2=[1,0], V3=[0,1]\n- S6: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-301.json b/voi/data/voi-301.json new file mode 100644 index 0000000000000000000000000000000000000000..ee6a64312c0628f413b09990a4d1ec20743174f8 --- /dev/null +++ b/voi/data/voi-301.json @@ -0,0 +1,285 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 7, + 5 + ], + [ + 6, + 5 + ], + [ + 6, + 4 + ], + [ + 7, + 4 + ] + ] + }, + { + "polygon": [ + [ + 5, + 6 + ], + [ + 5, + 5 + ], + [ + 6, + 5 + ], + [ + 6, + 6 + ] + ] + }, + { + "polygon": [ + [ + 5, + 5 + ], + [ + 6, + 5 + ], + [ + 6, + 8 + ], + [ + 5, + 8 + ] + ] + }, + { + "polygon": [ + [ + 6, + 4 + ], + [ + 6, + 6 + ], + [ + 5, + 6 + ], + [ + 5, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 4 + ] + ] + } + ], + "meta": { + "seed": 4205002, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "contourComplexity": 8, + "connectedComponents": 1, + "fillRatio": 0.109375, + "difficultyScore": 0.592361, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 302, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-301/target.png", + "shapes": { + "S1": "../images/voi-301/shape_S1.png", + "S2": "../images/voi-301/shape_S2.png", + "S3": "../images/voi-301/shape_S3.png", + "S4": "../images/voi-301/shape_S4.png", + "S5": "../images/voi-301/shape_S5.png", + "S6": "../images/voi-301/shape_S6.png" + } + }, + "ID": "voi-301", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 180, + "vertex": "V2", + "grid": [ + 6, + 5 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V3", + "grid": [ + 6, + 5 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V4", + "grid": [ + 5, + 8 + ] + }, + { + "shape": "S6", + "angle": 270, + "vertex": "V5", + "grid": [ + 3, + 5 + ] + } + ] + }, + "legacy_answer": "S2 180 V2 [6,5]\nS3 90 V3 [6,5]\nS4 0 V4 [5,8]\nS6 270 V5 [3,5]", + "solutionText": "S2 180 V2 [6,5]\nS3 90 V3 [6,5]\nS4 0 V4 [5,8]\nS6 270 V5 [3,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-301\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S3: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S4: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S5: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S6: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-302.json b/voi/data/voi-302.json new file mode 100644 index 0000000000000000000000000000000000000000..6af233da313a49f096089d426fd295ecad034d40 --- /dev/null +++ b/voi/data/voi-302.json @@ -0,0 +1,285 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 4 + ], + [ + 7, + 4 + ], + [ + 7, + 6 + ], + [ + 4, + 6 + ] + ] + }, + { + "polygon": [ + [ + 3, + 5 + ], + [ + 0, + 5 + ], + [ + 1, + 4 + ], + [ + 3, + 4 + ] + ] + }, + { + "polygon": [ + [ + 7, + 5 + ], + [ + 5, + 5 + ], + [ + 5, + 3 + ], + [ + 7, + 3 + ] + ] + }, + { + "polygon": [ + [ + 2, + 4 + ], + [ + 2, + 2 + ], + [ + 3, + 2 + ], + [ + 3, + 3 + ], + [ + 5, + 3 + ], + [ + 5, + 4 + ] + ] + } + ], + "meta": { + "seed": 4205003, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.241966, + "contourComplexity": 46, + "connectedComponents": 1, + "fillRatio": 0.195801, + "difficultyScore": 0.340535, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 303, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-302/target.png", + "shapes": { + "S1": "../images/voi-302/shape_S1.png", + "S2": "../images/voi-302/shape_S2.png", + "S3": "../images/voi-302/shape_S3.png", + "S4": "../images/voi-302/shape_S4.png", + "S5": "../images/voi-302/shape_S5.png", + "S6": "../images/voi-302/shape_S6.png" + } + }, + "ID": "voi-302", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V4", + "grid": [ + 4, + 6 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V2", + "grid": [ + 0, + 5 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V1", + "grid": [ + 7, + 5 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V2", + "grid": [ + 2, + 2 + ] + } + ] + }, + "legacy_answer": "S1 0 V4 [4,6]\nS2 180 V2 [0,5]\nS3 180 V1 [7,5]\nS4 90 V2 [2,2]", + "solutionText": "S1 0 V4 [4,6]\nS2 180 V2 [0,5]\nS3 180 V1 [7,5]\nS4 90 V2 [2,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-302\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S5: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S6: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-303.json b/voi/data/voi-303.json new file mode 100644 index 0000000000000000000000000000000000000000..3e4b907de150ebc7272d7275742a96c40088240e --- /dev/null +++ b/voi/data/voi-303.json @@ -0,0 +1,301 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 2 + ], + [ + 4, + 2 + ] + ] + }, + { + "polygon": [ + [ + 2, + 5 + ], + [ + 2, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 5 + ] + ] + }, + { + "polygon": [ + [ + 3, + 4 + ], + [ + 1, + 4 + ], + [ + 1, + 3 + ], + [ + 2, + 3 + ], + [ + 2, + 1 + ], + [ + 3, + 1 + ] + ] + }, + { + "polygon": [ + [ + 1, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 4 + ], + [ + 2, + 4 + ], + [ + 2, + 6 + ], + [ + 1, + 6 + ] + ] + } + ], + "meta": { + "seed": 4205004, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.307692, + "contourComplexity": 14, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.449519, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 304, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-303/target.png", + "shapes": { + "S1": "../images/voi-303/shape_S1.png", + "S2": "../images/voi-303/shape_S2.png", + "S3": "../images/voi-303/shape_S3.png", + "S4": "../images/voi-303/shape_S4.png", + "S5": "../images/voi-303/shape_S5.png", + "S6": "../images/voi-303/shape_S6.png" + } + }, + "ID": "voi-303", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V2", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V2", + "grid": [ + 2, + 4 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V1", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V1", + "grid": [ + 1, + 3 + ] + } + ] + }, + "legacy_answer": "S1 180 V2 [3,4]\nS2 90 V2 [2,4]\nS3 180 V1 [3,4]\nS5 0 V1 [1,3]", + "solutionText": "S1 180 V2 [3,4]\nS2 90 V2 [2,4]\nS3 180 V1 [3,4]\nS5 0 V1 [1,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-303\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S6: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-304.json b/voi/data/voi-304.json new file mode 100644 index 0000000000000000000000000000000000000000..d703cdc5a20db78a97b45a147958ae8bff7a48d3 --- /dev/null +++ b/voi/data/voi-304.json @@ -0,0 +1,293 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 5 + ], + [ + 4, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 5 + ] + ] + }, + { + "polygon": [ + [ + 0, + 4 + ], + [ + 0, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 4 + ] + ] + }, + { + "polygon": [ + [ + 0, + 5 + ], + [ + 0, + 3 + ], + [ + 1, + 3 + ], + [ + 1, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 5 + ] + ] + }, + { + "polygon": [ + [ + 5, + 4 + ], + [ + 5, + 6 + ], + [ + 3, + 6 + ], + [ + 3, + 4 + ] + ] + } + ], + "meta": { + "seed": 4205005, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.333333, + "contourComplexity": 12, + "connectedComponents": 1, + "fillRatio": 0.125, + "difficultyScore": 0.583333, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 305, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-304/target.png", + "shapes": { + "S1": "../images/voi-304/shape_S1.png", + "S2": "../images/voi-304/shape_S2.png", + "S3": "../images/voi-304/shape_S3.png", + "S4": "../images/voi-304/shape_S4.png", + "S5": "../images/voi-304/shape_S5.png", + "S6": "../images/voi-304/shape_S6.png" + } + }, + "ID": "voi-304", + "answer": { + "placements": [ + { + "shape": "S3", + "angle": 90, + "vertex": "V1", + "grid": [ + 4, + 5 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V2", + "grid": [ + 0, + 3 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V2", + "grid": [ + 0, + 3 + ] + }, + { + "shape": "S6", + "angle": 270, + "vertex": "V1", + "grid": [ + 5, + 4 + ] + } + ] + }, + "legacy_answer": "S3 90 V1 [4,5]\nS4 90 V2 [0,3]\nS5 90 V2 [0,3]\nS6 270 V1 [5,4]", + "solutionText": "S3 90 V1 [4,5]\nS4 90 V2 [0,3]\nS5 90 V2 [0,3]\nS6 270 V1 [5,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-304\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S4: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S6: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-305.json b/voi/data/voi-305.json new file mode 100644 index 0000000000000000000000000000000000000000..dfaedcadc894a81a6d1cb87cd06b04da82fea8b0 --- /dev/null +++ b/voi/data/voi-305.json @@ -0,0 +1,281 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 1, + 8 + ], + [ + 1, + 6 + ], + [ + 3, + 6 + ], + [ + 3, + 8 + ] + ] + }, + { + "polygon": [ + [ + 0, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 7 + ], + [ + 0, + 7 + ] + ] + }, + { + "polygon": [ + [ + 2, + 7 + ], + [ + 2, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 6 + ], + [ + 5, + 6 + ], + [ + 5, + 7 + ] + ] + }, + { + "polygon": [ + [ + 2, + 6 + ], + [ + 2, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 6 + ] + ] + } + ], + "meta": { + "seed": 4205006, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.3, + "contourComplexity": 17, + "connectedComponents": 1, + "fillRatio": 0.21875, + "difficultyScore": 0.2625, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 306, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-305/target.png", + "shapes": { + "S1": "../images/voi-305/shape_S1.png", + "S2": "../images/voi-305/shape_S2.png", + "S3": "../images/voi-305/shape_S3.png", + "S4": "../images/voi-305/shape_S4.png", + "S5": "../images/voi-305/shape_S5.png", + "S6": "../images/voi-305/shape_S6.png" + } + }, + "ID": "voi-305", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V2", + "grid": [ + 1, + 6 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V4", + "grid": [ + 0, + 7 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V6", + "grid": [ + 5, + 7 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V1", + "grid": [ + 2, + 6 + ] + } + ] + }, + "legacy_answer": "S1 90 V2 [1,6]\nS2 0 V4 [0,7]\nS3 90 V6 [5,7]\nS4 90 V1 [2,6]", + "solutionText": "S1 90 V2 [1,6]\nS2 0 V4 [0,7]\nS3 90 V6 [5,7]\nS4 90 V1 [2,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-305\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S6: V1=[0,0], V2=[1,0], V3=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-306.json b/voi/data/voi-306.json new file mode 100644 index 0000000000000000000000000000000000000000..8bb27873c28fd5a04c7b107c9c72c0625b54e85a --- /dev/null +++ b/voi/data/voi-306.json @@ -0,0 +1,269 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 8 + ], + [ + 3, + 6 + ], + [ + 5, + 6 + ], + [ + 5, + 8 + ] + ] + }, + { + "polygon": [ + [ + 3, + 2 + ], + [ + 3, + 4 + ], + [ + 1, + 2 + ] + ] + }, + { + "polygon": [ + [ + 3, + 4 + ], + [ + 3, + 7 + ], + [ + 2, + 7 + ], + [ + 2, + 4 + ] + ] + }, + { + "polygon": [ + [ + 4, + 7 + ], + [ + 4, + 8 + ], + [ + 2, + 8 + ], + [ + 2, + 7 + ] + ] + } + ], + "meta": { + "seed": 4205007, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.180791, + "contourComplexity": 74, + "connectedComponents": 1, + "fillRatio": 0.141602, + "difficultyScore": 0.693633, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 307, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-306/target.png", + "shapes": { + "S1": "../images/voi-306/shape_S1.png", + "S2": "../images/voi-306/shape_S2.png", + "S3": "../images/voi-306/shape_S3.png", + "S4": "../images/voi-306/shape_S4.png", + "S5": "../images/voi-306/shape_S5.png", + "S6": "../images/voi-306/shape_S6.png" + } + }, + "ID": "voi-306", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 90, + "vertex": "V2", + "grid": [ + 3, + 6 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V2", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V1", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S5", + "angle": 270, + "vertex": "V3", + "grid": [ + 2, + 8 + ] + } + ] + }, + "legacy_answer": "S2 90 V2 [3,6]\nS3 270 V2 [3,4]\nS4 270 V1 [3,4]\nS5 270 V3 [2,8]", + "solutionText": "S2 90 V2 [3,6]\nS3 270 V2 [3,4]\nS4 270 V1 [3,4]\nS5 270 V3 [2,8]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-306\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S5: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S6: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-307.json b/voi/data/voi-307.json new file mode 100644 index 0000000000000000000000000000000000000000..ca760ec66826e8770067b64492da4a01f633d67b --- /dev/null +++ b/voi/data/voi-307.json @@ -0,0 +1,269 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 0 + ], + [ + 5, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 0 + ] + ] + }, + { + "polygon": [ + [ + 4, + 0 + ], + [ + 6, + 0 + ], + [ + 6, + 1 + ], + [ + 4, + 1 + ] + ] + }, + { + "polygon": [ + [ + 2, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 5 + ], + [ + 2, + 5 + ] + ] + }, + { + "polygon": [ + [ + 5, + 3 + ], + [ + 5, + 0 + ], + [ + 6, + 0 + ], + [ + 6, + 3 + ] + ] + } + ], + "meta": { + "seed": 4205008, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.266667, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.171875, + "difficultyScore": 0.289583, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 308, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-307/target.png", + "shapes": { + "S1": "../images/voi-307/shape_S1.png", + "S2": "../images/voi-307/shape_S2.png", + "S3": "../images/voi-307/shape_S3.png", + "S4": "../images/voi-307/shape_S4.png", + "S5": "../images/voi-307/shape_S5.png", + "S6": "../images/voi-307/shape_S6.png" + } + }, + "ID": "voi-307", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V1", + "grid": [ + 5, + 0 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V3", + "grid": [ + 6, + 1 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V2", + "grid": [ + 4, + 3 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V4", + "grid": [ + 6, + 3 + ] + } + ] + }, + "legacy_answer": "S1 270 V1 [5,0]\nS3 0 V3 [6,1]\nS4 0 V2 [4,3]\nS5 90 V4 [6,3]", + "solutionText": "S1 270 V1 [5,0]\nS3 0 V3 [6,1]\nS4 0 V2 [4,3]\nS5 90 V4 [6,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-307\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S6: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-308.json b/voi/data/voi-308.json new file mode 100644 index 0000000000000000000000000000000000000000..febe837dc7e6bba2bfae8191d11c75b71d6f8443 --- /dev/null +++ b/voi/data/voi-308.json @@ -0,0 +1,261 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 3 + ], + [ + 5, + 3 + ] + ] + }, + { + "polygon": [ + [ + 2, + 3 + ], + [ + 4, + 3 + ], + [ + 2, + 5 + ] + ] + }, + { + "polygon": [ + [ + 3, + 4 + ], + [ + 3, + 1 + ], + [ + 5, + 1 + ], + [ + 5, + 4 + ] + ] + }, + { + "polygon": [ + [ + 2, + 4 + ], + [ + 0, + 4 + ], + [ + 0, + 3 + ], + [ + 2, + 3 + ] + ] + } + ], + "meta": { + "seed": 4205009, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.284444, + "contourComplexity": 74, + "connectedComponents": 1, + "fillRatio": 0.157227, + "difficultyScore": 0.323325, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 309, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-308/target.png", + "shapes": { + "S1": "../images/voi-308/shape_S1.png", + "S2": "../images/voi-308/shape_S2.png", + "S3": "../images/voi-308/shape_S3.png", + "S4": "../images/voi-308/shape_S4.png", + "S5": "../images/voi-308/shape_S5.png", + "S6": "../images/voi-308/shape_S6.png" + } + }, + "ID": "voi-308", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V4", + "grid": [ + 5, + 3 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V2", + "grid": [ + 4, + 3 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V1", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S5", + "angle": 180, + "vertex": "V3", + "grid": [ + 0, + 3 + ] + } + ] + }, + "legacy_answer": "S1 180 V4 [5,3]\nS3 0 V2 [4,3]\nS4 90 V1 [3,4]\nS5 180 V3 [0,3]", + "solutionText": "S1 180 V4 [5,3]\nS3 0 V2 [4,3]\nS4 90 V1 [3,4]\nS5 180 V3 [0,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-308\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S6: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-309.json b/voi/data/voi-309.json new file mode 100644 index 0000000000000000000000000000000000000000..726b02442aba2c1c983b55da54973a9b95a452c8 --- /dev/null +++ b/voi/data/voi-309.json @@ -0,0 +1,285 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 1, + 3 + ], + [ + 0, + 3 + ], + [ + 0, + 1 + ], + [ + 1, + 1 + ] + ] + }, + { + "polygon": [ + [ + 4, + 3 + ], + [ + 1, + 3 + ], + [ + 1, + 1 + ], + [ + 4, + 1 + ] + ] + }, + { + "polygon": [ + [ + 1, + 2 + ], + [ + 1, + 1 + ], + [ + 3, + 1 + ], + [ + 3, + 2 + ] + ] + }, + { + "polygon": [ + [ + 0, + 5 + ], + [ + 0, + 3 + ], + [ + 1, + 3 + ], + [ + 1, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 5 + ] + ] + } + ], + "meta": { + "seed": 4205010, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "contourComplexity": 12, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.330357, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 310, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-309/target.png", + "shapes": { + "S1": "../images/voi-309/shape_S1.png", + "S2": "../images/voi-309/shape_S2.png", + "S3": "../images/voi-309/shape_S3.png", + "S4": "../images/voi-309/shape_S4.png", + "S5": "../images/voi-309/shape_S5.png", + "S6": "../images/voi-309/shape_S6.png" + } + }, + "ID": "voi-309", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 180, + "vertex": "V3", + "grid": [ + 0, + 1 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V3", + "grid": [ + 1, + 1 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V2", + "grid": [ + 1, + 1 + ] + }, + { + "shape": "S6", + "angle": 90, + "vertex": "V3", + "grid": [ + 1, + 3 + ] + } + ] + }, + "legacy_answer": "S2 180 V3 [0,1]\nS3 180 V3 [1,1]\nS4 90 V2 [1,1]\nS6 90 V3 [1,3]", + "solutionText": "S2 180 V3 [0,1]\nS3 180 V3 [1,1]\nS4 90 V2 [1,1]\nS6 90 V3 [1,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-309\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S2: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S6: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-310.json b/voi/data/voi-310.json new file mode 100644 index 0000000000000000000000000000000000000000..eba8e6ed85ff915ecbcf2ec35bd85fb401626b97 --- /dev/null +++ b/voi/data/voi-310.json @@ -0,0 +1,293 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 1 + ], + [ + 5, + 1 + ], + [ + 5, + 3 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 3, + 5 + ], + [ + 1, + 5 + ], + [ + 1, + 4 + ], + [ + 2, + 4 + ], + [ + 2, + 2 + ], + [ + 3, + 2 + ] + ] + }, + { + "polygon": [ + [ + 1, + 4 + ], + [ + 1, + 2 + ], + [ + 2, + 2 + ], + [ + 2, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 4 + ] + ] + }, + { + "polygon": [ + [ + 4, + 4 + ], + [ + 4, + 5 + ], + [ + 3, + 4 + ] + ] + } + ], + "meta": { + "seed": 4205011, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.159601, + "contourComplexity": 45, + "connectedComponents": 1, + "fillRatio": 0.164551, + "difficultyScore": 0.732494, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 311, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-310/target.png", + "shapes": { + "S1": "../images/voi-310/shape_S1.png", + "S2": "../images/voi-310/shape_S2.png", + "S3": "../images/voi-310/shape_S3.png", + "S4": "../images/voi-310/shape_S4.png", + "S5": "../images/voi-310/shape_S5.png", + "S6": "../images/voi-310/shape_S6.png" + } + }, + "ID": "voi-310", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V2", + "grid": [ + 5, + 1 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V3", + "grid": [ + 1, + 4 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V2", + "grid": [ + 1, + 2 + ] + }, + { + "shape": "S6", + "angle": 270, + "vertex": "V1", + "grid": [ + 4, + 4 + ] + } + ] + }, + "legacy_answer": "S1 0 V2 [5,1]\nS3 180 V3 [1,4]\nS4 90 V2 [1,2]\nS6 270 V1 [4,4]", + "solutionText": "S1 0 V2 [5,1]\nS3 180 V3 [1,4]\nS4 90 V2 [1,2]\nS6 270 V1 [4,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-310\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S6: V1=[0,0], V2=[1,0], V3=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-311.json b/voi/data/voi-311.json new file mode 100644 index 0000000000000000000000000000000000000000..689ab2d4d4bbbc2a3de8c49e838a779d52ba8f40 --- /dev/null +++ b/voi/data/voi-311.json @@ -0,0 +1,261 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 2 + ], + [ + 4, + 5 + ], + [ + 3, + 4 + ], + [ + 3, + 2 + ] + ] + }, + { + "polygon": [ + [ + 2, + 7 + ], + [ + 2, + 4 + ], + [ + 4, + 4 + ], + [ + 4, + 7 + ] + ] + }, + { + "polygon": [ + [ + 2, + 1 + ], + [ + 4, + 1 + ], + [ + 2, + 3 + ] + ] + }, + { + "polygon": [ + [ + 2, + 4 + ], + [ + 2, + 1 + ], + [ + 3, + 2 + ], + [ + 3, + 4 + ] + ] + } + ], + "meta": { + "seed": 4205012, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.242857, + "contourComplexity": 132, + "connectedComponents": 1, + "fillRatio": 0.155273, + "difficultyScore": 0.418025, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 312, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-311/target.png", + "shapes": { + "S1": "../images/voi-311/shape_S1.png", + "S2": "../images/voi-311/shape_S2.png", + "S3": "../images/voi-311/shape_S3.png", + "S4": "../images/voi-311/shape_S4.png", + "S5": "../images/voi-311/shape_S5.png", + "S6": "../images/voi-311/shape_S6.png" + } + }, + "ID": "voi-311", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V4", + "grid": [ + 3, + 2 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V4", + "grid": [ + 4, + 7 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V1", + "grid": [ + 2, + 1 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V4", + "grid": [ + 3, + 4 + ] + } + ] + }, + "legacy_answer": "S1 270 V4 [3,2]\nS2 90 V4 [4,7]\nS3 0 V1 [2,1]\nS4 90 V4 [3,4]", + "solutionText": "S1 270 V4 [3,2]\nS2 90 V4 [4,7]\nS3 0 V1 [2,1]\nS4 90 V4 [3,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-311\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S6: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-312.json b/voi/data/voi-312.json new file mode 100644 index 0000000000000000000000000000000000000000..8fd968299d1743091570167741e3cb149d5b30d8 --- /dev/null +++ b/voi/data/voi-312.json @@ -0,0 +1,281 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 1 + ], + [ + 5, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 1 + ] + ] + }, + { + "polygon": [ + [ + 4, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 2 + ], + [ + 4, + 2 + ] + ] + }, + { + "polygon": [ + [ + 4, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 6 + ], + [ + 4, + 6 + ] + ] + }, + { + "polygon": [ + [ + 5, + 5 + ], + [ + 7, + 5 + ], + [ + 7, + 6 + ], + [ + 6, + 6 + ], + [ + 6, + 8 + ], + [ + 5, + 8 + ] + ] + } + ], + "meta": { + "seed": 4205013, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "contourComplexity": 12, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.330357, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 313, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-312/target.png", + "shapes": { + "S1": "../images/voi-312/shape_S1.png", + "S2": "../images/voi-312/shape_S2.png", + "S3": "../images/voi-312/shape_S3.png", + "S4": "../images/voi-312/shape_S4.png", + "S5": "../images/voi-312/shape_S5.png", + "S6": "../images/voi-312/shape_S6.png" + } + }, + "ID": "voi-312", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V1", + "grid": [ + 5, + 1 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V3", + "grid": [ + 3, + 2 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V4", + "grid": [ + 4, + 6 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V6", + "grid": [ + 5, + 8 + ] + } + ] + }, + "legacy_answer": "S1 270 V1 [5,1]\nS2 180 V3 [3,2]\nS3 0 V4 [4,6]\nS5 0 V6 [5,8]", + "solutionText": "S1 270 V1 [5,1]\nS2 180 V3 [3,2]\nS3 0 V4 [4,6]\nS5 0 V6 [5,8]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-312\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S6: V1=[0,0], V2=[1,0], V3=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-313.json b/voi/data/voi-313.json new file mode 100644 index 0000000000000000000000000000000000000000..49884ebe653416dca7037f43dd2c852c5b009a85 --- /dev/null +++ b/voi/data/voi-313.json @@ -0,0 +1,265 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 7, + 7 + ], + [ + 7, + 6 + ], + [ + 8, + 6 + ], + [ + 8, + 7 + ] + ] + }, + { + "polygon": [ + [ + 6, + 8 + ], + [ + 4, + 8 + ], + [ + 4, + 6 + ], + [ + 6, + 6 + ] + ] + }, + { + "polygon": [ + [ + 6, + 5 + ], + [ + 8, + 5 + ], + [ + 8, + 7 + ], + [ + 6, + 7 + ] + ] + }, + { + "polygon": [ + [ + 4, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 6 + ], + [ + 4, + 6 + ] + ] + } + ], + "meta": { + "seed": 4205014, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.181818, + "contourComplexity": 12, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.691477, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 314, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-313/target.png", + "shapes": { + "S1": "../images/voi-313/shape_S1.png", + "S2": "../images/voi-313/shape_S2.png", + "S3": "../images/voi-313/shape_S3.png", + "S4": "../images/voi-313/shape_S4.png", + "S5": "../images/voi-313/shape_S5.png", + "S6": "../images/voi-313/shape_S6.png" + } + }, + "ID": "voi-313", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V3", + "grid": [ + 8, + 6 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V3", + "grid": [ + 4, + 6 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V3", + "grid": [ + 8, + 7 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V1", + "grid": [ + 4, + 4 + ] + } + ] + }, + "legacy_answer": "S1 90 V3 [8,6]\nS3 180 V3 [4,6]\nS4 0 V3 [8,7]\nS5 0 V1 [4,4]", + "solutionText": "S1 90 V3 [8,6]\nS3 180 V3 [4,6]\nS4 0 V3 [8,7]\nS5 0 V1 [4,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-313\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S2: V1=[0,0], V2=[1,0], V3=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S5: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S6: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-314.json b/voi/data/voi-314.json new file mode 100644 index 0000000000000000000000000000000000000000..b487aad344ebadebfe4626576e6c9cdeee62893c --- /dev/null +++ b/voi/data/voi-314.json @@ -0,0 +1,277 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 2 + ], + [ + 3, + 4 + ], + [ + 1, + 2 + ] + ] + }, + { + "polygon": [ + [ + 7, + 3 + ], + [ + 7, + 4 + ], + [ + 4, + 4 + ], + [ + 4, + 3 + ] + ] + }, + { + "polygon": [ + [ + 5, + 4 + ], + [ + 5, + 6 + ], + [ + 4, + 6 + ], + [ + 4, + 5 + ], + [ + 2, + 5 + ], + [ + 2, + 4 + ] + ] + }, + { + "polygon": [ + [ + 7, + 3 + ], + [ + 7, + 6 + ], + [ + 5, + 6 + ], + [ + 5, + 3 + ] + ] + } + ], + "meta": { + "seed": 4205015, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.26556, + "contourComplexity": 76, + "connectedComponents": 1, + "fillRatio": 0.172852, + "difficultyScore": 0.292056, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 315, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-314/target.png", + "shapes": { + "S1": "../images/voi-314/shape_S1.png", + "S2": "../images/voi-314/shape_S2.png", + "S3": "../images/voi-314/shape_S3.png", + "S4": "../images/voi-314/shape_S4.png", + "S5": "../images/voi-314/shape_S5.png", + "S6": "../images/voi-314/shape_S6.png" + } + }, + "ID": "voi-314", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V2", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V1", + "grid": [ + 7, + 3 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V3", + "grid": [ + 4, + 6 + ] + }, + { + "shape": "S6", + "angle": 270, + "vertex": "V2", + "grid": [ + 7, + 6 + ] + } + ] + }, + "legacy_answer": "S1 270 V2 [3,4]\nS2 270 V1 [7,3]\nS4 270 V3 [4,6]\nS6 270 V2 [7,6]", + "solutionText": "S1 270 V2 [3,4]\nS2 270 V1 [7,3]\nS4 270 V3 [4,6]\nS6 270 V2 [7,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-314\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S3: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S5: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S6: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-315.json b/voi/data/voi-315.json new file mode 100644 index 0000000000000000000000000000000000000000..828c3c63327f4b76e9aecd8f4236db1ad9cab7b0 --- /dev/null +++ b/voi/data/voi-315.json @@ -0,0 +1,265 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 2 + ], + [ + 5, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 2 + ] + ] + }, + { + "polygon": [ + [ + 7, + 4 + ], + [ + 7, + 5 + ], + [ + 5, + 5 + ], + [ + 5, + 4 + ] + ] + }, + { + "polygon": [ + [ + 3, + 3 + ], + [ + 3, + 0 + ], + [ + 5, + 0 + ], + [ + 5, + 3 + ] + ] + }, + { + "polygon": [ + [ + 3, + 3 + ], + [ + 3, + 2 + ], + [ + 5, + 2 + ], + [ + 5, + 3 + ] + ] + } + ], + "meta": { + "seed": 4205016, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.25, + "contourComplexity": 6, + "connectedComponents": 1, + "fillRatio": 0.1875, + "difficultyScore": 0.325, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 316, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-315/target.png", + "shapes": { + "S1": "../images/voi-315/shape_S1.png", + "S2": "../images/voi-315/shape_S2.png", + "S3": "../images/voi-315/shape_S3.png", + "S4": "../images/voi-315/shape_S4.png", + "S5": "../images/voi-315/shape_S5.png", + "S6": "../images/voi-315/shape_S6.png" + } + }, + "ID": "voi-315", + "answer": { + "placements": [ + { + "shape": "S3", + "angle": 270, + "vertex": "V3", + "grid": [ + 3, + 5 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V3", + "grid": [ + 5, + 5 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V2", + "grid": [ + 3, + 0 + ] + }, + { + "shape": "S6", + "angle": 90, + "vertex": "V2", + "grid": [ + 3, + 2 + ] + } + ] + }, + "legacy_answer": "S3 270 V3 [3,5]\nS4 270 V3 [5,5]\nS5 90 V2 [3,0]\nS6 90 V2 [3,2]", + "solutionText": "S3 270 V3 [3,5]\nS4 270 V3 [5,5]\nS5 90 V2 [3,0]\nS6 90 V2 [3,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-315\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S6: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-316.json b/voi/data/voi-316.json new file mode 100644 index 0000000000000000000000000000000000000000..eab0636283b6a6dcc4af794aef0419241e0bad98 --- /dev/null +++ b/voi/data/voi-316.json @@ -0,0 +1,269 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 4 + ], + [ + 4, + 7 + ], + [ + 2, + 7 + ], + [ + 2, + 4 + ] + ] + }, + { + "polygon": [ + [ + 3, + 1 + ], + [ + 4, + 1 + ], + [ + 4, + 4 + ], + [ + 3, + 4 + ] + ] + }, + { + "polygon": [ + [ + 3, + 3 + ], + [ + 3, + 1 + ], + [ + 5, + 1 + ], + [ + 5, + 3 + ] + ] + }, + { + "polygon": [ + [ + 6, + 3 + ], + [ + 6, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 3 + ] + ] + } + ], + "meta": { + "seed": 4205017, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.235294, + "contourComplexity": 12, + "connectedComponents": 1, + "fillRatio": 0.203125, + "difficultyScore": 0.352574, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 317, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-316/target.png", + "shapes": { + "S1": "../images/voi-316/shape_S1.png", + "S2": "../images/voi-316/shape_S2.png", + "S3": "../images/voi-316/shape_S3.png", + "S4": "../images/voi-316/shape_S4.png", + "S5": "../images/voi-316/shape_S5.png", + "S6": "../images/voi-316/shape_S6.png" + } + }, + "ID": "voi-316", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 270, + "vertex": "V4", + "grid": [ + 2, + 4 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V4", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V2", + "grid": [ + 3, + 1 + ] + }, + { + "shape": "S6", + "angle": 270, + "vertex": "V3", + "grid": [ + 4, + 5 + ] + } + ] + }, + "legacy_answer": "S2 270 V4 [2,4]\nS3 0 V4 [3,4]\nS4 90 V2 [3,1]\nS6 270 V3 [4,5]", + "solutionText": "S2 270 V4 [2,4]\nS3 0 V4 [3,4]\nS4 90 V2 [3,1]\nS6 270 V3 [4,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-316\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S6: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-317.json b/voi/data/voi-317.json new file mode 100644 index 0000000000000000000000000000000000000000..f0215f87bddd32bf2b4201e8025471228a49fa60 --- /dev/null +++ b/voi/data/voi-317.json @@ -0,0 +1,285 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 5 + ], + [ + 5, + 5 + ], + [ + 5, + 6 + ], + [ + 4, + 6 + ], + [ + 4, + 8 + ], + [ + 3, + 8 + ] + ] + }, + { + "polygon": [ + [ + 2, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 6 + ], + [ + 2, + 6 + ] + ] + }, + { + "polygon": [ + [ + 8, + 6 + ], + [ + 5, + 6 + ], + [ + 5, + 4 + ], + [ + 8, + 4 + ] + ] + }, + { + "polygon": [ + [ + 8, + 4 + ], + [ + 8, + 6 + ], + [ + 7, + 6 + ], + [ + 7, + 4 + ] + ] + } + ], + "meta": { + "seed": 4205018, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "contourComplexity": 12, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.330357, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 318, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-317/target.png", + "shapes": { + "S1": "../images/voi-317/shape_S1.png", + "S2": "../images/voi-317/shape_S2.png", + "S3": "../images/voi-317/shape_S3.png", + "S4": "../images/voi-317/shape_S4.png", + "S5": "../images/voi-317/shape_S5.png", + "S6": "../images/voi-317/shape_S6.png" + } + }, + "ID": "voi-317", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V1", + "grid": [ + 3, + 5 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V2", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V3", + "grid": [ + 5, + 4 + ] + }, + { + "shape": "S6", + "angle": 270, + "vertex": "V3", + "grid": [ + 7, + 6 + ] + } + ] + }, + "legacy_answer": "S1 0 V1 [3,5]\nS2 0 V2 [3,4]\nS3 180 V3 [5,4]\nS6 270 V3 [7,6]", + "solutionText": "S1 0 V1 [3,5]\nS2 0 V2 [3,4]\nS3 180 V3 [5,4]\nS6 270 V3 [7,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-317\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S2: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S6: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-318.json b/voi/data/voi-318.json new file mode 100644 index 0000000000000000000000000000000000000000..23a5b88b31c45e4cdb008409e2ddc6421dc0b529 --- /dev/null +++ b/voi/data/voi-318.json @@ -0,0 +1,269 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 2 + ], + [ + 6, + 2 + ], + [ + 6, + 3 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 7, + 3 + ], + [ + 7, + 5 + ], + [ + 6, + 5 + ], + [ + 6, + 4 + ], + [ + 4, + 4 + ], + [ + 4, + 3 + ] + ] + }, + { + "polygon": [ + [ + 3, + 2 + ], + [ + 5, + 2 + ], + [ + 3, + 4 + ] + ] + }, + { + "polygon": [ + [ + 7, + 4 + ], + [ + 7, + 2 + ], + [ + 8, + 2 + ], + [ + 8, + 4 + ] + ] + } + ], + "meta": { + "seed": 4205019, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.276836, + "contourComplexity": 76, + "connectedComponents": 1, + "fillRatio": 0.125, + "difficultyScore": 0.357345, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 319, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-318/target.png", + "shapes": { + "S1": "../images/voi-318/shape_S1.png", + "S2": "../images/voi-318/shape_S2.png", + "S3": "../images/voi-318/shape_S3.png", + "S4": "../images/voi-318/shape_S4.png", + "S5": "../images/voi-318/shape_S5.png", + "S6": "../images/voi-318/shape_S6.png" + } + }, + "ID": "voi-318", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V1", + "grid": [ + 3, + 2 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V3", + "grid": [ + 6, + 5 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V1", + "grid": [ + 3, + 2 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V2", + "grid": [ + 7, + 2 + ] + } + ] + }, + "legacy_answer": "S1 0 V1 [3,2]\nS3 270 V3 [6,5]\nS4 0 V1 [3,2]\nS5 90 V2 [7,2]", + "solutionText": "S1 0 V1 [3,2]\nS3 270 V3 [6,5]\nS4 0 V1 [3,2]\nS5 90 V2 [7,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-318\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S6: V1=[0,0], V2=[1,0], V3=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-319.json b/voi/data/voi-319.json new file mode 100644 index 0000000000000000000000000000000000000000..4fce27ed964cb62c9978127345c52e21e1aab4cd --- /dev/null +++ b/voi/data/voi-319.json @@ -0,0 +1,277 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 8 + ], + [ + 5, + 5 + ], + [ + 7, + 5 + ], + [ + 7, + 8 + ] + ] + }, + { + "polygon": [ + [ + 4, + 4 + ], + [ + 4, + 6 + ], + [ + 2, + 6 + ], + [ + 2, + 4 + ] + ] + }, + { + "polygon": [ + [ + 5, + 8 + ], + [ + 5, + 6 + ], + [ + 7, + 8 + ] + ] + }, + { + "polygon": [ + [ + 6, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 2 + ], + [ + 6, + 2 + ] + ] + } + ], + "meta": { + "seed": 4205020, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.256809, + "contourComplexity": 74, + "connectedComponents": 1, + "fillRatio": 0.186523, + "difficultyScore": 0.299716, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 320, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-319/target.png", + "shapes": { + "S1": "../images/voi-319/shape_S1.png", + "S2": "../images/voi-319/shape_S2.png", + "S3": "../images/voi-319/shape_S3.png", + "S4": "../images/voi-319/shape_S4.png", + "S5": "../images/voi-319/shape_S5.png", + "S6": "../images/voi-319/shape_S6.png" + } + }, + "ID": "voi-319", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V4", + "grid": [ + 7, + 8 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V4", + "grid": [ + 2, + 4 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V2", + "grid": [ + 5, + 6 + ] + }, + { + "shape": "S6", + "angle": 180, + "vertex": "V5", + "grid": [ + 5, + 2 + ] + } + ] + }, + "legacy_answer": "S1 90 V4 [7,8]\nS4 270 V4 [2,4]\nS5 90 V2 [5,6]\nS6 180 V5 [5,2]", + "solutionText": "S1 90 V4 [7,8]\nS4 270 V4 [2,4]\nS5 90 V2 [5,6]\nS6 180 V5 [5,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-319\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S3: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[0,2]\n- S6: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-320.json b/voi/data/voi-320.json new file mode 100644 index 0000000000000000000000000000000000000000..8a6774bc3879d2a07f5f40463e98ff9379f9bad2 --- /dev/null +++ b/voi/data/voi-320.json @@ -0,0 +1,277 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 3 + ], + [ + 5, + 6 + ], + [ + 3, + 6 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 7, + 2 + ], + [ + 7, + 4 + ], + [ + 6, + 4 + ], + [ + 6, + 2 + ] + ] + }, + { + "polygon": [ + [ + 7, + 6 + ], + [ + 5, + 6 + ], + [ + 5, + 4 + ], + [ + 7, + 4 + ] + ] + }, + { + "polygon": [ + [ + 5, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 3 + ], + [ + 5, + 3 + ] + ] + } + ], + "meta": { + "seed": 4205021, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.330357, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 321, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-320/target.png", + "shapes": { + "S1": "../images/voi-320/shape_S1.png", + "S2": "../images/voi-320/shape_S2.png", + "S3": "../images/voi-320/shape_S3.png", + "S4": "../images/voi-320/shape_S4.png", + "S5": "../images/voi-320/shape_S5.png", + "S6": "../images/voi-320/shape_S6.png" + } + }, + "ID": "voi-320", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V3", + "grid": [ + 3, + 6 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V2", + "grid": [ + 7, + 4 + ] + }, + { + "shape": "S5", + "angle": 180, + "vertex": "V4", + "grid": [ + 7, + 4 + ] + }, + { + "shape": "S6", + "angle": 180, + "vertex": "V2", + "grid": [ + 4, + 5 + ] + } + ] + }, + "legacy_answer": "S1 270 V3 [3,6]\nS4 270 V2 [7,4]\nS5 180 V4 [7,4]\nS6 180 V2 [4,5]", + "solutionText": "S1 270 V3 [3,6]\nS4 270 V2 [7,4]\nS5 180 V4 [7,4]\nS6 180 V2 [4,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-320\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S5: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S6: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-321.json b/voi/data/voi-321.json new file mode 100644 index 0000000000000000000000000000000000000000..b55e15ac1af2e9c2470b7077e7016e163f52acb6 --- /dev/null +++ b/voi/data/voi-321.json @@ -0,0 +1,277 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 6 + ], + [ + 3, + 6 + ], + [ + 3, + 4 + ], + [ + 5, + 4 + ] + ] + }, + { + "polygon": [ + [ + 5, + 3 + ], + [ + 5, + 5 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 4, + 5 + ], + [ + 4, + 3 + ], + [ + 5, + 3 + ], + [ + 5, + 4 + ], + [ + 7, + 4 + ], + [ + 7, + 5 + ] + ] + }, + { + "polygon": [ + [ + 2, + 6 + ], + [ + 5, + 6 + ], + [ + 5, + 8 + ], + [ + 2, + 8 + ] + ] + } + ], + "meta": { + "seed": 4205022, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.249027, + "contourComplexity": 74, + "connectedComponents": 1, + "fillRatio": 0.188477, + "difficultyScore": 0.326938, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 322, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-321/target.png", + "shapes": { + "S1": "../images/voi-321/shape_S1.png", + "S2": "../images/voi-321/shape_S2.png", + "S3": "../images/voi-321/shape_S3.png", + "S4": "../images/voi-321/shape_S4.png", + "S5": "../images/voi-321/shape_S5.png", + "S6": "../images/voi-321/shape_S6.png" + } + }, + "ID": "voi-321", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V2", + "grid": [ + 3, + 6 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V3", + "grid": [ + 3, + 3 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V4", + "grid": [ + 5, + 4 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V3", + "grid": [ + 5, + 8 + ] + } + ] + }, + "legacy_answer": "S1 180 V2 [3,6]\nS2 270 V3 [3,3]\nS3 90 V4 [5,4]\nS4 0 V3 [5,8]", + "solutionText": "S1 180 V2 [3,6]\nS2 270 V3 [3,3]\nS3 90 V4 [5,4]\nS4 0 V3 [5,8]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-321\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S6: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-322.json b/voi/data/voi-322.json new file mode 100644 index 0000000000000000000000000000000000000000..5ca714bfe1c836273e3489be099065e834968f6c --- /dev/null +++ b/voi/data/voi-322.json @@ -0,0 +1,285 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 1 + ], + [ + 4, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 2 + ], + [ + 1, + 2 + ], + [ + 1, + 1 + ] + ] + }, + { + "polygon": [ + [ + 5, + 1 + ], + [ + 5, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 1 + ] + ] + }, + { + "polygon": [ + [ + 2, + 2 + ], + [ + 2, + 5 + ], + [ + 1, + 4 + ], + [ + 1, + 2 + ] + ] + }, + { + "polygon": [ + [ + 5, + 5 + ], + [ + 2, + 5 + ], + [ + 2, + 4 + ], + [ + 5, + 4 + ] + ] + } + ], + "meta": { + "seed": 4205023, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.257545, + "contourComplexity": 42, + "connectedComponents": 1, + "fillRatio": 0.180176, + "difficultyScore": 0.309467, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 323, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-322/target.png", + "shapes": { + "S1": "../images/voi-322/shape_S1.png", + "S2": "../images/voi-322/shape_S2.png", + "S3": "../images/voi-322/shape_S3.png", + "S4": "../images/voi-322/shape_S4.png", + "S5": "../images/voi-322/shape_S5.png", + "S6": "../images/voi-322/shape_S6.png" + } + }, + "ID": "voi-322", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 270, + "vertex": "V1", + "grid": [ + 4, + 1 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V2", + "grid": [ + 5, + 4 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V3", + "grid": [ + 1, + 4 + ] + }, + { + "shape": "S6", + "angle": 180, + "vertex": "V1", + "grid": [ + 5, + 5 + ] + } + ] + }, + "legacy_answer": "S2 270 V1 [4,1]\nS3 270 V2 [5,4]\nS4 270 V3 [1,4]\nS6 180 V1 [5,5]", + "solutionText": "S2 270 V1 [4,1]\nS3 270 V2 [5,4]\nS4 270 V3 [1,4]\nS6 180 V1 [5,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-322\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S5: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S6: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-323.json b/voi/data/voi-323.json new file mode 100644 index 0000000000000000000000000000000000000000..f1da33594be3e9b62847ee6b41132f669113470b --- /dev/null +++ b/voi/data/voi-323.json @@ -0,0 +1,257 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 5 + ], + [ + 7, + 5 + ], + [ + 7, + 7 + ], + [ + 5, + 7 + ] + ] + }, + { + "polygon": [ + [ + 5, + 3 + ], + [ + 7, + 3 + ], + [ + 5, + 5 + ] + ] + }, + { + "polygon": [ + [ + 3, + 5 + ], + [ + 3, + 2 + ], + [ + 5, + 2 + ], + [ + 5, + 5 + ] + ] + }, + { + "polygon": [ + [ + 5, + 2 + ], + [ + 8, + 2 + ], + [ + 8, + 4 + ], + [ + 5, + 4 + ] + ] + } + ], + "meta": { + "seed": 4205024, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.16955, + "contourComplexity": 74, + "connectedComponents": 1, + "fillRatio": 0.234375, + "difficultyScore": 0.553049, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 324, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-323/target.png", + "shapes": { + "S1": "../images/voi-323/shape_S1.png", + "S2": "../images/voi-323/shape_S2.png", + "S3": "../images/voi-323/shape_S3.png", + "S4": "../images/voi-323/shape_S4.png", + "S5": "../images/voi-323/shape_S5.png", + "S6": "../images/voi-323/shape_S6.png" + } + }, + "ID": "voi-323", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 0, + "vertex": "V1", + "grid": [ + 5, + 5 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V1", + "grid": [ + 5, + 3 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V3", + "grid": [ + 5, + 2 + ] + }, + { + "shape": "S6", + "angle": 0, + "vertex": "V2", + "grid": [ + 8, + 2 + ] + } + ] + }, + "legacy_answer": "S2 0 V1 [5,5]\nS3 0 V1 [5,3]\nS5 90 V3 [5,2]\nS6 0 V2 [8,2]", + "solutionText": "S2 0 V1 [5,5]\nS3 0 V1 [5,3]\nS5 90 V3 [5,2]\nS6 0 V2 [8,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-323\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[0,1]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S6: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-324.json b/voi/data/voi-324.json new file mode 100644 index 0000000000000000000000000000000000000000..8df77ccb3f7b5a08638dd8193d1c8e3a04114be3 --- /dev/null +++ b/voi/data/voi-324.json @@ -0,0 +1,285 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 6 + ], + [ + 1, + 6 + ], + [ + 1, + 4 + ], + [ + 4, + 4 + ] + ] + }, + { + "polygon": [ + [ + 7, + 7 + ], + [ + 6, + 7 + ], + [ + 6, + 4 + ], + [ + 7, + 4 + ] + ] + }, + { + "polygon": [ + [ + 4, + 5 + ], + [ + 4, + 7 + ], + [ + 3, + 7 + ], + [ + 3, + 5 + ] + ] + }, + { + "polygon": [ + [ + 3, + 6 + ], + [ + 3, + 4 + ], + [ + 4, + 4 + ], + [ + 4, + 5 + ], + [ + 6, + 5 + ], + [ + 6, + 6 + ] + ] + } + ], + "meta": { + "seed": 4205025, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.266667, + "contourComplexity": 14, + "connectedComponents": 1, + "fillRatio": 0.171875, + "difficultyScore": 0.289583, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 325, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-324/target.png", + "shapes": { + "S1": "../images/voi-324/shape_S1.png", + "S2": "../images/voi-324/shape_S2.png", + "S3": "../images/voi-324/shape_S3.png", + "S4": "../images/voi-324/shape_S4.png", + "S5": "../images/voi-324/shape_S5.png", + "S6": "../images/voi-324/shape_S6.png" + } + }, + "ID": "voi-324", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V2", + "grid": [ + 1, + 6 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V1", + "grid": [ + 7, + 7 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V2", + "grid": [ + 4, + 7 + ] + }, + { + "shape": "S6", + "angle": 90, + "vertex": "V1", + "grid": [ + 3, + 6 + ] + } + ] + }, + "legacy_answer": "S1 180 V2 [1,6]\nS2 180 V1 [7,7]\nS3 270 V2 [4,7]\nS6 90 V1 [3,6]", + "solutionText": "S1 180 V2 [1,6]\nS2 180 V1 [7,7]\nS3 270 V2 [4,7]\nS6 90 V1 [3,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-324\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S5: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S6: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-325.json b/voi/data/voi-325.json new file mode 100644 index 0000000000000000000000000000000000000000..d930fa0de078bcc5b75cd55244969372db461d48 --- /dev/null +++ b/voi/data/voi-325.json @@ -0,0 +1,297 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 7 + ], + [ + 6, + 4 + ], + [ + 7, + 4 + ], + [ + 7, + 7 + ] + ] + }, + { + "polygon": [ + [ + 5, + 8 + ], + [ + 3, + 8 + ], + [ + 3, + 7 + ], + [ + 4, + 7 + ], + [ + 4, + 5 + ], + [ + 5, + 5 + ] + ] + }, + { + "polygon": [ + [ + 7, + 8 + ], + [ + 5, + 8 + ], + [ + 5, + 7 + ], + [ + 6, + 7 + ], + [ + 6, + 5 + ], + [ + 7, + 5 + ] + ] + }, + { + "polygon": [ + [ + 6, + 4 + ], + [ + 6, + 6 + ], + [ + 5, + 6 + ], + [ + 5, + 4 + ] + ] + } + ], + "meta": { + "seed": 4205026, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.307692, + "contourComplexity": 14, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.449519, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 326, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-325/target.png", + "shapes": { + "S1": "../images/voi-325/shape_S1.png", + "S2": "../images/voi-325/shape_S2.png", + "S3": "../images/voi-325/shape_S3.png", + "S4": "../images/voi-325/shape_S4.png", + "S5": "../images/voi-325/shape_S5.png", + "S6": "../images/voi-325/shape_S6.png" + } + }, + "ID": "voi-325", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V3", + "grid": [ + 7, + 4 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V1", + "grid": [ + 5, + 8 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V1", + "grid": [ + 7, + 8 + ] + }, + { + "shape": "S6", + "angle": 270, + "vertex": "V3", + "grid": [ + 5, + 6 + ] + } + ] + }, + "legacy_answer": "S1 90 V3 [7,4]\nS3 180 V1 [5,8]\nS4 180 V1 [7,8]\nS6 270 V3 [5,6]", + "solutionText": "S1 90 V3 [7,4]\nS3 180 V1 [5,8]\nS4 180 V1 [7,8]\nS6 270 V3 [5,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-325\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S5: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S6: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-326.json b/voi/data/voi-326.json new file mode 100644 index 0000000000000000000000000000000000000000..2e05780e9afef64aba05aa4f982b1134c69b024c --- /dev/null +++ b/voi/data/voi-326.json @@ -0,0 +1,297 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 5 + ], + [ + 7, + 5 + ], + [ + 7, + 6 + ], + [ + 4, + 6 + ] + ] + }, + { + "polygon": [ + [ + 6, + 5 + ], + [ + 6, + 8 + ], + [ + 4, + 8 + ], + [ + 4, + 5 + ] + ] + }, + { + "polygon": [ + [ + 2, + 6 + ], + [ + 2, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 5 + ], + [ + 5, + 5 + ], + [ + 5, + 6 + ] + ] + }, + { + "polygon": [ + [ + 8, + 8 + ], + [ + 6, + 8 + ], + [ + 6, + 7 + ], + [ + 7, + 7 + ], + [ + 7, + 5 + ], + [ + 8, + 5 + ] + ] + } + ], + "meta": { + "seed": 4205027, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.235294, + "contourComplexity": 17, + "connectedComponents": 1, + "fillRatio": 0.203125, + "difficultyScore": 0.352574, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 327, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-326/target.png", + "shapes": { + "S1": "../images/voi-326/shape_S1.png", + "S2": "../images/voi-326/shape_S2.png", + "S3": "../images/voi-326/shape_S3.png", + "S4": "../images/voi-326/shape_S4.png", + "S5": "../images/voi-326/shape_S5.png", + "S6": "../images/voi-326/shape_S6.png" + } + }, + "ID": "voi-326", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V1", + "grid": [ + 4, + 5 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V2", + "grid": [ + 6, + 8 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V3", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V4", + "grid": [ + 7, + 7 + ] + } + ] + }, + "legacy_answer": "S1 0 V1 [4,5]\nS2 270 V2 [6,8]\nS3 90 V3 [3,4]\nS4 180 V4 [7,7]", + "solutionText": "S1 0 V1 [4,5]\nS2 270 V2 [6,8]\nS3 90 V3 [3,4]\nS4 180 V4 [7,7]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-326\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S5: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S6: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-327.json b/voi/data/voi-327.json new file mode 100644 index 0000000000000000000000000000000000000000..64d70ec1fbfd1f27f2adc760a80f9a16581f2a19 --- /dev/null +++ b/voi/data/voi-327.json @@ -0,0 +1,273 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 2 + ], + [ + 6, + 2 + ] + ] + }, + { + "polygon": [ + [ + 3, + 8 + ], + [ + 3, + 5 + ], + [ + 5, + 5 + ], + [ + 5, + 8 + ] + ] + }, + { + "polygon": [ + [ + 4, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 3 + ], + [ + 4, + 3 + ] + ] + }, + { + "polygon": [ + [ + 5, + 6 + ], + [ + 4, + 6 + ], + [ + 4, + 5 + ], + [ + 5, + 5 + ] + ] + } + ], + "meta": { + "seed": 4205028, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.166667, + "contourComplexity": 8, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.720833, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 328, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-327/target.png", + "shapes": { + "S1": "../images/voi-327/shape_S1.png", + "S2": "../images/voi-327/shape_S2.png", + "S3": "../images/voi-327/shape_S3.png", + "S4": "../images/voi-327/shape_S4.png", + "S5": "../images/voi-327/shape_S5.png", + "S6": "../images/voi-327/shape_S6.png" + } + }, + "ID": "voi-327", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V2", + "grid": [ + 3, + 3 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V3", + "grid": [ + 5, + 5 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V3", + "grid": [ + 3, + 3 + ] + }, + { + "shape": "S5", + "angle": 180, + "vertex": "V2", + "grid": [ + 4, + 6 + ] + } + ] + }, + "legacy_answer": "S1 180 V2 [3,3]\nS2 90 V3 [5,5]\nS3 180 V3 [3,3]\nS5 180 V2 [4,6]", + "solutionText": "S1 180 V2 [3,3]\nS2 90 V3 [5,5]\nS3 180 V3 [3,3]\nS5 180 V2 [4,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-327\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S5: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S6: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-328.json b/voi/data/voi-328.json new file mode 100644 index 0000000000000000000000000000000000000000..950547b8f734a91f400bcb35e9fce94d7af06e65 --- /dev/null +++ b/voi/data/voi-328.json @@ -0,0 +1,265 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 2 + ], + [ + 5, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 2 + ] + ] + }, + { + "polygon": [ + [ + 4, + 2 + ], + [ + 4, + 3 + ], + [ + 1, + 3 + ], + [ + 1, + 2 + ] + ] + }, + { + "polygon": [ + [ + 4, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 1 + ], + [ + 4, + 1 + ] + ] + }, + { + "polygon": [ + [ + 4, + 4 + ], + [ + 4, + 1 + ], + [ + 6, + 1 + ], + [ + 6, + 4 + ] + ] + } + ], + "meta": { + "seed": 4205029, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "contourComplexity": 13, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.330357, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 329, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-328/target.png", + "shapes": { + "S1": "../images/voi-328/shape_S1.png", + "S2": "../images/voi-328/shape_S2.png", + "S3": "../images/voi-328/shape_S3.png", + "S4": "../images/voi-328/shape_S4.png", + "S5": "../images/voi-328/shape_S5.png", + "S6": "../images/voi-328/shape_S6.png" + } + }, + "ID": "voi-328", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 270, + "vertex": "V1", + "grid": [ + 5, + 2 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V3", + "grid": [ + 1, + 3 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V1", + "grid": [ + 4, + 4 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V2", + "grid": [ + 4, + 1 + ] + } + ] + }, + "legacy_answer": "S2 270 V1 [5,2]\nS3 270 V3 [1,3]\nS4 180 V1 [4,4]\nS5 90 V2 [4,1]", + "solutionText": "S2 270 V1 [5,2]\nS3 270 V3 [1,3]\nS4 180 V1 [4,4]\nS5 90 V2 [4,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-328\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[0,1]\n- S2: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S4: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S6: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-329.json b/voi/data/voi-329.json new file mode 100644 index 0000000000000000000000000000000000000000..a669ea2d1de1d28f630906ad28bfce762c00c45d --- /dev/null +++ b/voi/data/voi-329.json @@ -0,0 +1,269 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 1, + 6 + ], + [ + 4, + 6 + ], + [ + 3, + 7 + ], + [ + 1, + 7 + ] + ] + }, + { + "polygon": [ + [ + 2, + 6 + ], + [ + 1, + 6 + ], + [ + 1, + 4 + ], + [ + 2, + 4 + ] + ] + }, + { + "polygon": [ + [ + 4, + 3 + ], + [ + 4, + 6 + ], + [ + 3, + 5 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 3, + 4 + ], + [ + 3, + 5 + ], + [ + 1, + 5 + ], + [ + 1, + 4 + ] + ] + } + ], + "meta": { + "seed": 4205030, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.22069, + "contourComplexity": 73, + "connectedComponents": 1, + "fillRatio": 0.110352, + "difficultyScore": 0.596538, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 330, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-329/target.png", + "shapes": { + "S1": "../images/voi-329/shape_S1.png", + "S2": "../images/voi-329/shape_S2.png", + "S3": "../images/voi-329/shape_S3.png", + "S4": "../images/voi-329/shape_S4.png", + "S5": "../images/voi-329/shape_S5.png", + "S6": "../images/voi-329/shape_S6.png" + } + }, + "ID": "voi-329", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V1", + "grid": [ + 1, + 6 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V4", + "grid": [ + 2, + 4 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V4", + "grid": [ + 3, + 3 + ] + }, + { + "shape": "S5", + "angle": 270, + "vertex": "V4", + "grid": [ + 1, + 4 + ] + } + ] + }, + "legacy_answer": "S1 0 V1 [1,6]\nS2 180 V4 [2,4]\nS4 270 V4 [3,3]\nS5 270 V4 [1,4]", + "solutionText": "S1 0 V1 [1,6]\nS2 180 V4 [2,4]\nS4 270 V4 [3,3]\nS5 270 V4 [1,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-329\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S4: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S5: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S6: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-330.json b/voi/data/voi-330.json new file mode 100644 index 0000000000000000000000000000000000000000..52a8a0721ebeecdf3b5ba432bc10abaad682b02d --- /dev/null +++ b/voi/data/voi-330.json @@ -0,0 +1,269 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 5 + ], + [ + 4, + 8 + ], + [ + 2, + 8 + ], + [ + 2, + 5 + ] + ] + }, + { + "polygon": [ + [ + 3, + 4 + ], + [ + 6, + 4 + ], + [ + 5, + 5 + ], + [ + 3, + 5 + ] + ] + }, + { + "polygon": [ + [ + 4, + 7 + ], + [ + 4, + 8 + ], + [ + 1, + 8 + ], + [ + 1, + 7 + ] + ] + }, + { + "polygon": [ + [ + 1, + 4 + ], + [ + 2, + 4 + ], + [ + 2, + 7 + ], + [ + 1, + 7 + ] + ] + } + ], + "meta": { + "seed": 4205031, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.275269, + "contourComplexity": 42, + "connectedComponents": 1, + "fillRatio": 0.164551, + "difficultyScore": 0.271974, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 331, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-330/target.png", + "shapes": { + "S1": "../images/voi-330/shape_S1.png", + "S2": "../images/voi-330/shape_S2.png", + "S3": "../images/voi-330/shape_S3.png", + "S4": "../images/voi-330/shape_S4.png", + "S5": "../images/voi-330/shape_S5.png", + "S6": "../images/voi-330/shape_S6.png" + } + }, + "ID": "voi-330", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 270, + "vertex": "V2", + "grid": [ + 4, + 8 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V4", + "grid": [ + 3, + 5 + ] + }, + { + "shape": "S5", + "angle": 270, + "vertex": "V1", + "grid": [ + 4, + 7 + ] + }, + { + "shape": "S6", + "angle": 0, + "vertex": "V1", + "grid": [ + 1, + 4 + ] + } + ] + }, + "legacy_answer": "S2 270 V2 [4,8]\nS3 0 V4 [3,5]\nS5 270 V1 [4,7]\nS6 0 V1 [1,4]", + "solutionText": "S2 270 V2 [4,8]\nS3 0 V4 [3,5]\nS5 270 V1 [4,7]\nS6 0 V1 [1,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-330\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S5: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S6: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-331.json b/voi/data/voi-331.json new file mode 100644 index 0000000000000000000000000000000000000000..873b84745bff3927739a4ff130698873252e49a9 --- /dev/null +++ b/voi/data/voi-331.json @@ -0,0 +1,261 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 4 + ], + [ + 2, + 2 + ], + [ + 4, + 4 + ] + ] + }, + { + "polygon": [ + [ + 4, + 2 + ], + [ + 4, + 3 + ], + [ + 3, + 2 + ] + ] + }, + { + "polygon": [ + [ + 1, + 0 + ], + [ + 3, + 0 + ], + [ + 3, + 2 + ], + [ + 1, + 2 + ] + ] + }, + { + "polygon": [ + [ + 3, + 4 + ], + [ + 3, + 1 + ], + [ + 5, + 1 + ], + [ + 5, + 4 + ] + ] + } + ], + "meta": { + "seed": 4205032, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.168734, + "contourComplexity": 107, + "connectedComponents": 1, + "fillRatio": 0.163574, + "difficultyScore": 0.697914, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 332, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-331/target.png", + "shapes": { + "S1": "../images/voi-331/shape_S1.png", + "S2": "../images/voi-331/shape_S2.png", + "S3": "../images/voi-331/shape_S3.png", + "S4": "../images/voi-331/shape_S4.png", + "S5": "../images/voi-331/shape_S5.png", + "S6": "../images/voi-331/shape_S6.png" + } + }, + "ID": "voi-331", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V1", + "grid": [ + 2, + 4 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V2", + "grid": [ + 4, + 3 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V1", + "grid": [ + 1, + 0 + ] + }, + { + "shape": "S6", + "angle": 90, + "vertex": "V4", + "grid": [ + 5, + 4 + ] + } + ] + }, + "legacy_answer": "S1 90 V1 [2,4]\nS2 270 V2 [4,3]\nS4 0 V1 [1,0]\nS6 90 V4 [5,4]", + "solutionText": "S1 90 V1 [2,4]\nS2 270 V2 [4,3]\nS4 0 V1 [1,0]\nS6 90 V4 [5,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-331\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[0,1]\n- S3: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S6: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-332.json b/voi/data/voi-332.json new file mode 100644 index 0000000000000000000000000000000000000000..a801911f1add0705076ccb7ff280bce4d8f281e2 --- /dev/null +++ b/voi/data/voi-332.json @@ -0,0 +1,261 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 0, + 4 + ], + [ + 2, + 4 + ], + [ + 0, + 6 + ] + ] + }, + { + "polygon": [ + [ + 5, + 4 + ], + [ + 5, + 7 + ], + [ + 3, + 7 + ], + [ + 3, + 4 + ] + ] + }, + { + "polygon": [ + [ + 2, + 5 + ], + [ + 2, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 5 + ] + ] + }, + { + "polygon": [ + [ + 3, + 6 + ], + [ + 0, + 6 + ], + [ + 0, + 5 + ], + [ + 3, + 5 + ] + ] + } + ], + "meta": { + "seed": 4205033, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.36, + "contourComplexity": 72, + "connectedComponents": 1, + "fillRatio": 0.140625, + "difficultyScore": 0.65875, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 333, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-332/target.png", + "shapes": { + "S1": "../images/voi-332/shape_S1.png", + "S2": "../images/voi-332/shape_S2.png", + "S3": "../images/voi-332/shape_S3.png", + "S4": "../images/voi-332/shape_S4.png", + "S5": "../images/voi-332/shape_S5.png", + "S6": "../images/voi-332/shape_S6.png" + } + }, + "ID": "voi-332", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V1", + "grid": [ + 0, + 4 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V4", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V2", + "grid": [ + 2, + 4 + ] + }, + { + "shape": "S6", + "angle": 180, + "vertex": "V4", + "grid": [ + 3, + 5 + ] + } + ] + }, + "legacy_answer": "S1 0 V1 [0,4]\nS4 270 V4 [3,4]\nS5 90 V2 [2,4]\nS6 180 V4 [3,5]", + "solutionText": "S1 0 V1 [0,4]\nS4 270 V4 [3,4]\nS5 90 V2 [2,4]\nS6 180 V4 [3,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-332\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S3: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S6: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-333.json b/voi/data/voi-333.json new file mode 100644 index 0000000000000000000000000000000000000000..604159cb64d0b1c15a1ee65b2003e7b8b11d1ea5 --- /dev/null +++ b/voi/data/voi-333.json @@ -0,0 +1,277 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 4 + ], + [ + 6, + 4 + ], + [ + 4, + 6 + ] + ] + }, + { + "polygon": [ + [ + 5, + 4 + ], + [ + 7, + 4 + ], + [ + 5, + 6 + ] + ] + }, + { + "polygon": [ + [ + 5, + 6 + ], + [ + 5, + 4 + ], + [ + 6, + 4 + ], + [ + 6, + 5 + ], + [ + 8, + 5 + ], + [ + 8, + 6 + ] + ] + }, + { + "polygon": [ + [ + 3, + 7 + ], + [ + 3, + 6 + ], + [ + 6, + 6 + ], + [ + 6, + 7 + ] + ] + } + ], + "meta": { + "seed": 4205034, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.275281, + "contourComplexity": 134, + "connectedComponents": 1, + "fillRatio": 0.125977, + "difficultyScore": 0.34917, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 334, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-333/target.png", + "shapes": { + "S1": "../images/voi-333/shape_S1.png", + "S2": "../images/voi-333/shape_S2.png", + "S3": "../images/voi-333/shape_S3.png", + "S4": "../images/voi-333/shape_S4.png", + "S5": "../images/voi-333/shape_S5.png", + "S6": "../images/voi-333/shape_S6.png" + } + }, + "ID": "voi-333", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V2", + "grid": [ + 6, + 4 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V3", + "grid": [ + 5, + 6 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V6", + "grid": [ + 8, + 6 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V4", + "grid": [ + 6, + 7 + ] + } + ] + }, + "legacy_answer": "S1 0 V2 [6,4]\nS2 0 V3 [5,6]\nS3 90 V6 [8,6]\nS4 90 V4 [6,7]", + "solutionText": "S1 0 V2 [6,4]\nS2 0 V3 [5,6]\nS3 90 V6 [8,6]\nS4 90 V4 [6,7]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-333\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S5: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S6: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-334.json b/voi/data/voi-334.json new file mode 100644 index 0000000000000000000000000000000000000000..7f4c73071deb705ddcd54e7d7e7132694091f9b0 --- /dev/null +++ b/voi/data/voi-334.json @@ -0,0 +1,281 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 2 + ], + [ + 2, + 5 + ], + [ + 1, + 5 + ], + [ + 1, + 2 + ] + ] + }, + { + "polygon": [ + [ + 1, + 4 + ], + [ + 1, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 4 + ] + ] + }, + { + "polygon": [ + [ + 2, + 2 + ], + [ + 5, + 2 + ], + [ + 5, + 4 + ], + [ + 2, + 4 + ] + ] + }, + { + "polygon": [ + [ + 0, + 3 + ], + [ + 2, + 3 + ], + [ + 2, + 4 + ], + [ + 1, + 4 + ], + [ + 1, + 6 + ], + [ + 0, + 6 + ] + ] + } + ], + "meta": { + "seed": 4205035, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.266667, + "contourComplexity": 12, + "connectedComponents": 1, + "fillRatio": 0.171875, + "difficultyScore": 0.289583, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 335, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-334/target.png", + "shapes": { + "S1": "../images/voi-334/shape_S1.png", + "S2": "../images/voi-334/shape_S2.png", + "S3": "../images/voi-334/shape_S3.png", + "S4": "../images/voi-334/shape_S4.png", + "S5": "../images/voi-334/shape_S5.png", + "S6": "../images/voi-334/shape_S6.png" + } + }, + "ID": "voi-334", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 270, + "vertex": "V4", + "grid": [ + 1, + 2 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V1", + "grid": [ + 1, + 4 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V3", + "grid": [ + 5, + 4 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V4", + "grid": [ + 1, + 4 + ] + } + ] + }, + "legacy_answer": "S2 270 V4 [1,2]\nS3 90 V1 [1,4]\nS4 0 V3 [5,4]\nS5 0 V4 [1,4]", + "solutionText": "S2 270 V4 [1,2]\nS3 90 V1 [1,4]\nS4 0 V3 [5,4]\nS5 0 V4 [1,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-334\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S3: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S6: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-335.json b/voi/data/voi-335.json new file mode 100644 index 0000000000000000000000000000000000000000..4051429ddfc8a56e15f8ee641be3460b131b1df5 --- /dev/null +++ b/voi/data/voi-335.json @@ -0,0 +1,261 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 1 + ], + [ + 6, + 1 + ], + [ + 6, + 3 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 0, + 5 + ], + [ + 0, + 2 + ], + [ + 1, + 2 + ], + [ + 1, + 5 + ] + ] + }, + { + "polygon": [ + [ + 6, + 3 + ], + [ + 4, + 3 + ], + [ + 6, + 1 + ] + ] + }, + { + "polygon": [ + [ + 1, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 4 + ], + [ + 1, + 4 + ] + ] + } + ], + "meta": { + "seed": 4205036, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.293333, + "contourComplexity": 72, + "connectedComponents": 1, + "fillRatio": 0.155273, + "difficultyScore": 0.362786, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 336, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-335/target.png", + "shapes": { + "S1": "../images/voi-335/shape_S1.png", + "S2": "../images/voi-335/shape_S2.png", + "S3": "../images/voi-335/shape_S3.png", + "S4": "../images/voi-335/shape_S4.png", + "S5": "../images/voi-335/shape_S5.png", + "S6": "../images/voi-335/shape_S6.png" + } + }, + "ID": "voi-335", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V4", + "grid": [ + 3, + 3 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V3", + "grid": [ + 1, + 2 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V2", + "grid": [ + 4, + 3 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V1", + "grid": [ + 1, + 3 + ] + } + ] + }, + "legacy_answer": "S1 0 V4 [3,3]\nS2 90 V3 [1,2]\nS3 180 V2 [4,3]\nS5 0 V1 [1,3]", + "solutionText": "S1 0 V4 [3,3]\nS2 90 V3 [1,2]\nS3 180 V2 [4,3]\nS5 0 V1 [1,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-335\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S6: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-336.json b/voi/data/voi-336.json new file mode 100644 index 0000000000000000000000000000000000000000..6b4c85fcc914ead69bff0e480d33a74ecca3b1bf --- /dev/null +++ b/voi/data/voi-336.json @@ -0,0 +1,261 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 1, + 4 + ], + [ + 4, + 4 + ], + [ + 4, + 5 + ], + [ + 1, + 5 + ] + ] + }, + { + "polygon": [ + [ + 5, + 2 + ], + [ + 5, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 2 + ] + ] + }, + { + "polygon": [ + [ + 2, + 2 + ], + [ + 5, + 2 + ], + [ + 5, + 4 + ], + [ + 2, + 4 + ] + ] + }, + { + "polygon": [ + [ + 0, + 4 + ], + [ + 1, + 4 + ], + [ + 0, + 5 + ] + ] + } + ], + "meta": { + "seed": 4205037, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.319202, + "contourComplexity": 40, + "connectedComponents": 1, + "fillRatio": 0.133301, + "difficultyScore": 0.510206, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 337, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-336/target.png", + "shapes": { + "S1": "../images/voi-336/shape_S1.png", + "S2": "../images/voi-336/shape_S2.png", + "S3": "../images/voi-336/shape_S3.png", + "S4": "../images/voi-336/shape_S4.png", + "S5": "../images/voi-336/shape_S5.png", + "S6": "../images/voi-336/shape_S6.png" + } + }, + "ID": "voi-336", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V4", + "grid": [ + 1, + 5 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V3", + "grid": [ + 4, + 5 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V3", + "grid": [ + 5, + 4 + ] + }, + { + "shape": "S6", + "angle": 0, + "vertex": "V3", + "grid": [ + 0, + 5 + ] + } + ] + }, + "legacy_answer": "S1 0 V4 [1,5]\nS2 270 V3 [4,5]\nS4 0 V3 [5,4]\nS6 0 V3 [0,5]", + "solutionText": "S1 0 V4 [1,5]\nS2 270 V3 [4,5]\nS4 0 V3 [5,4]\nS6 0 V3 [0,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-336\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S3: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S6: V1=[0,0], V2=[1,0], V3=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-337.json b/voi/data/voi-337.json new file mode 100644 index 0000000000000000000000000000000000000000..1e147cffca79f9e3957b543ba28069a2471ee912 --- /dev/null +++ b/voi/data/voi-337.json @@ -0,0 +1,257 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 5 + ], + [ + 4, + 6 + ], + [ + 2, + 6 + ], + [ + 2, + 5 + ] + ] + }, + { + "polygon": [ + [ + 1, + 6 + ], + [ + 1, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 6 + ] + ] + }, + { + "polygon": [ + [ + 4, + 4 + ], + [ + 2, + 4 + ], + [ + 4, + 2 + ] + ] + }, + { + "polygon": [ + [ + 2, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 8 + ], + [ + 2, + 8 + ] + ] + } + ], + "meta": { + "seed": 4205038, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.180791, + "contourComplexity": 76, + "connectedComponents": 1, + "fillRatio": 0.141602, + "difficultyScore": 0.693633, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 338, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-337/target.png", + "shapes": { + "S1": "../images/voi-337/shape_S1.png", + "S2": "../images/voi-337/shape_S2.png", + "S3": "../images/voi-337/shape_S3.png", + "S4": "../images/voi-337/shape_S4.png", + "S5": "../images/voi-337/shape_S5.png", + "S6": "../images/voi-337/shape_S6.png" + } + }, + "ID": "voi-337", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V3", + "grid": [ + 2, + 6 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V1", + "grid": [ + 1, + 6 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V2", + "grid": [ + 2, + 4 + ] + }, + { + "shape": "S6", + "angle": 0, + "vertex": "V3", + "grid": [ + 3, + 8 + ] + } + ] + }, + "legacy_answer": "S1 270 V3 [2,6]\nS3 90 V1 [1,6]\nS4 180 V2 [2,4]\nS6 0 V3 [3,8]", + "solutionText": "S1 270 V3 [2,6]\nS3 90 V1 [1,6]\nS4 180 V2 [2,4]\nS6 0 V3 [3,8]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-337\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n- S5: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S6: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-338.json b/voi/data/voi-338.json new file mode 100644 index 0000000000000000000000000000000000000000..edaf9c25fcc27767a6e95f6a2ab6cf1680eddc49 --- /dev/null +++ b/voi/data/voi-338.json @@ -0,0 +1,261 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 1 + ], + [ + 3, + 1 + ], + [ + 3, + 4 + ], + [ + 2, + 4 + ] + ] + }, + { + "polygon": [ + [ + 4, + 6 + ], + [ + 2, + 6 + ], + [ + 2, + 5 + ], + [ + 4, + 5 + ] + ] + }, + { + "polygon": [ + [ + 1, + 7 + ], + [ + 1, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 7 + ] + ] + }, + { + "polygon": [ + [ + 4, + 5 + ], + [ + 4, + 8 + ], + [ + 3, + 8 + ], + [ + 3, + 5 + ] + ] + } + ], + "meta": { + "seed": 4205039, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "contourComplexity": 12, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.330357, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 339, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-338/target.png", + "shapes": { + "S1": "../images/voi-338/shape_S1.png", + "S2": "../images/voi-338/shape_S2.png", + "S3": "../images/voi-338/shape_S3.png", + "S4": "../images/voi-338/shape_S4.png", + "S5": "../images/voi-338/shape_S5.png", + "S6": "../images/voi-338/shape_S6.png" + } + }, + "ID": "voi-338", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 0, + "vertex": "V4", + "grid": [ + 2, + 4 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V4", + "grid": [ + 4, + 5 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V2", + "grid": [ + 1, + 4 + ] + }, + { + "shape": "S5", + "angle": 270, + "vertex": "V4", + "grid": [ + 3, + 5 + ] + } + ] + }, + "legacy_answer": "S2 0 V4 [2,4]\nS3 180 V4 [4,5]\nS4 90 V2 [1,4]\nS5 270 V4 [3,5]", + "solutionText": "S2 0 V4 [2,4]\nS3 180 V4 [4,5]\nS4 90 V2 [1,4]\nS5 270 V4 [3,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-338\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S6: V1=[0,0], V2=[1,0], V3=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-339.json b/voi/data/voi-339.json new file mode 100644 index 0000000000000000000000000000000000000000..4b935f8d224232f4f741cf82d223e3b341457b5c --- /dev/null +++ b/voi/data/voi-339.json @@ -0,0 +1,241 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 8 + ], + [ + 5, + 5 + ], + [ + 7, + 5 + ], + [ + 7, + 8 + ] + ] + }, + { + "polygon": [ + [ + 6, + 6 + ], + [ + 4, + 6 + ], + [ + 6, + 4 + ] + ] + }, + { + "polygon": [ + [ + 6, + 4 + ], + [ + 7, + 4 + ], + [ + 6, + 5 + ] + ] + }, + { + "polygon": [ + [ + 4, + 8 + ], + [ + 4, + 6 + ], + [ + 6, + 8 + ] + ] + } + ], + "meta": { + "seed": 4205040, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.28739, + "contourComplexity": 169, + "connectedComponents": 1, + "fillRatio": 0.118652, + "difficultyScore": 0.412255, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 340, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-339/target.png", + "shapes": { + "S1": "../images/voi-339/shape_S1.png", + "S2": "../images/voi-339/shape_S2.png", + "S3": "../images/voi-339/shape_S3.png", + "S4": "../images/voi-339/shape_S4.png", + "S5": "../images/voi-339/shape_S5.png", + "S6": "../images/voi-339/shape_S6.png" + } + }, + "ID": "voi-339", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V3", + "grid": [ + 7, + 5 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V1", + "grid": [ + 6, + 6 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V1", + "grid": [ + 6, + 4 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V1", + "grid": [ + 4, + 8 + ] + } + ] + }, + "legacy_answer": "S1 90 V3 [7,5]\nS3 180 V1 [6,6]\nS4 0 V1 [6,4]\nS5 90 V1 [4,8]", + "solutionText": "S1 90 V3 [7,5]\nS3 180 V1 [6,6]\nS4 0 V1 [6,4]\nS5 90 V1 [4,8]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-339\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[0,1]\n- S5: V1=[0,0], V2=[2,0], V3=[0,2]\n- S6: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-340.json b/voi/data/voi-340.json new file mode 100644 index 0000000000000000000000000000000000000000..d9e9b70feedd578abae9861bf8e3e09d1787240a --- /dev/null +++ b/voi/data/voi-340.json @@ -0,0 +1,261 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 3 + ], + [ + 3, + 3 + ], + [ + 4, + 2 + ], + [ + 6, + 2 + ] + ] + }, + { + "polygon": [ + [ + 4, + 4 + ], + [ + 4, + 5 + ], + [ + 2, + 5 + ], + [ + 2, + 4 + ] + ] + }, + { + "polygon": [ + [ + 1, + 3 + ], + [ + 2, + 3 + ], + [ + 2, + 4 + ], + [ + 1, + 4 + ] + ] + }, + { + "polygon": [ + [ + 1, + 4 + ], + [ + 1, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 4 + ] + ] + } + ], + "meta": { + "seed": 4205041, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.234432, + "contourComplexity": 38, + "connectedComponents": 1, + "fillRatio": 0.102051, + "difficultyScore": 0.558169, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 341, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-340/target.png", + "shapes": { + "S1": "../images/voi-340/shape_S1.png", + "S2": "../images/voi-340/shape_S2.png", + "S3": "../images/voi-340/shape_S3.png", + "S4": "../images/voi-340/shape_S4.png", + "S5": "../images/voi-340/shape_S5.png", + "S6": "../images/voi-340/shape_S6.png" + } + }, + "ID": "voi-340", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V4", + "grid": [ + 6, + 2 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V3", + "grid": [ + 2, + 5 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V1", + "grid": [ + 1, + 3 + ] + }, + { + "shape": "S6", + "angle": 90, + "vertex": "V2", + "grid": [ + 1, + 3 + ] + } + ] + }, + "legacy_answer": "S1 180 V4 [6,2]\nS2 270 V3 [2,5]\nS4 0 V1 [1,3]\nS6 90 V2 [1,3]", + "solutionText": "S1 180 V4 [6,2]\nS2 270 V3 [2,5]\nS4 0 V1 [1,3]\nS6 90 V2 [1,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-340\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S5: V1=[0,0], V2=[2,0], V3=[0,2]\n- S6: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-341.json b/voi/data/voi-341.json new file mode 100644 index 0000000000000000000000000000000000000000..69030f7693129735b369e0afdefb231e8b3b7e3b --- /dev/null +++ b/voi/data/voi-341.json @@ -0,0 +1,261 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 5 + ], + [ + 2, + 5 + ], + [ + 2, + 4 + ], + [ + 4, + 4 + ] + ] + }, + { + "polygon": [ + [ + 3, + 4 + ], + [ + 3, + 7 + ], + [ + 2, + 6 + ], + [ + 2, + 4 + ] + ] + }, + { + "polygon": [ + [ + 7, + 4 + ], + [ + 4, + 4 + ], + [ + 4, + 3 + ], + [ + 7, + 3 + ] + ] + }, + { + "polygon": [ + [ + 2, + 3 + ], + [ + 4, + 3 + ], + [ + 2, + 5 + ] + ] + } + ], + "meta": { + "seed": 4205042, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.208469, + "contourComplexity": 102, + "connectedComponents": 1, + "fillRatio": 0.118652, + "difficultyScore": 0.628819, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 342, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-341/target.png", + "shapes": { + "S1": "../images/voi-341/shape_S1.png", + "S2": "../images/voi-341/shape_S2.png", + "S3": "../images/voi-341/shape_S3.png", + "S4": "../images/voi-341/shape_S4.png", + "S5": "../images/voi-341/shape_S5.png", + "S6": "../images/voi-341/shape_S6.png" + } + }, + "ID": "voi-341", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V2", + "grid": [ + 2, + 5 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V1", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S5", + "angle": 180, + "vertex": "V4", + "grid": [ + 7, + 3 + ] + }, + { + "shape": "S6", + "angle": 0, + "vertex": "V3", + "grid": [ + 2, + 5 + ] + } + ] + }, + "legacy_answer": "S1 180 V2 [2,5]\nS3 270 V1 [3,4]\nS5 180 V4 [7,3]\nS6 0 V3 [2,5]", + "solutionText": "S1 180 V2 [2,5]\nS3 270 V1 [3,4]\nS5 180 V4 [7,3]\nS6 0 V3 [2,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-341\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S3: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S5: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S6: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-342.json b/voi/data/voi-342.json new file mode 100644 index 0000000000000000000000000000000000000000..74cf69accf70bee0628ecbef1215b8effd6559c2 --- /dev/null +++ b/voi/data/voi-342.json @@ -0,0 +1,281 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 0, + 2 + ], + [ + 0, + 0 + ], + [ + 1, + 0 + ], + [ + 1, + 1 + ], + [ + 3, + 1 + ], + [ + 3, + 2 + ] + ] + }, + { + "polygon": [ + [ + 5, + 2 + ], + [ + 2, + 2 + ], + [ + 3, + 1 + ], + [ + 5, + 1 + ] + ] + }, + { + "polygon": [ + [ + 4, + 3 + ], + [ + 2, + 3 + ], + [ + 2, + 1 + ], + [ + 4, + 1 + ] + ] + }, + { + "polygon": [ + [ + 6, + 2 + ], + [ + 6, + 4 + ], + [ + 4, + 4 + ], + [ + 4, + 2 + ] + ] + } + ], + "meta": { + "seed": 4205043, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.275269, + "contourComplexity": 48, + "connectedComponents": 1, + "fillRatio": 0.164551, + "difficultyScore": 0.271974, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 343, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-342/target.png", + "shapes": { + "S1": "../images/voi-342/shape_S1.png", + "S2": "../images/voi-342/shape_S2.png", + "S3": "../images/voi-342/shape_S3.png", + "S4": "../images/voi-342/shape_S4.png", + "S5": "../images/voi-342/shape_S5.png", + "S6": "../images/voi-342/shape_S6.png" + } + }, + "ID": "voi-342", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V6", + "grid": [ + 3, + 2 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V4", + "grid": [ + 5, + 1 + ] + }, + { + "shape": "S5", + "angle": 180, + "vertex": "V2", + "grid": [ + 2, + 3 + ] + }, + { + "shape": "S6", + "angle": 270, + "vertex": "V1", + "grid": [ + 6, + 2 + ] + } + ] + }, + "legacy_answer": "S1 90 V6 [3,2]\nS4 180 V4 [5,1]\nS5 180 V2 [2,3]\nS6 270 V1 [6,2]", + "solutionText": "S1 90 V6 [3,2]\nS4 180 V4 [5,1]\nS5 180 V2 [2,3]\nS6 270 V1 [6,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-342\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S5: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S6: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-343.json b/voi/data/voi-343.json new file mode 100644 index 0000000000000000000000000000000000000000..fc66b464cb09efd6c5ea9b6f863d9fa19517b5e9 --- /dev/null +++ b/voi/data/voi-343.json @@ -0,0 +1,285 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 4 + ], + [ + 4, + 4 + ], + [ + 4, + 2 + ], + [ + 5, + 2 + ] + ] + }, + { + "polygon": [ + [ + 6, + 0 + ], + [ + 6, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 0 + ] + ] + }, + { + "polygon": [ + [ + 4, + 7 + ], + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 5, + 7 + ] + ] + }, + { + "polygon": [ + [ + 6, + 2 + ], + [ + 6, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 2 + ] + ] + } + ], + "meta": { + "seed": 4205044, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.275269, + "contourComplexity": 44, + "connectedComponents": 1, + "fillRatio": 0.164551, + "difficultyScore": 0.271974, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 344, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-343/target.png", + "shapes": { + "S1": "../images/voi-343/shape_S1.png", + "S2": "../images/voi-343/shape_S2.png", + "S3": "../images/voi-343/shape_S3.png", + "S4": "../images/voi-343/shape_S4.png", + "S5": "../images/voi-343/shape_S5.png", + "S6": "../images/voi-343/shape_S6.png" + } + }, + "ID": "voi-343", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V3", + "grid": [ + 4, + 2 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V3", + "grid": [ + 4, + 3 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V2", + "grid": [ + 4, + 4 + ] + }, + { + "shape": "S6", + "angle": 270, + "vertex": "V6", + "grid": [ + 3, + 2 + ] + } + ] + }, + "legacy_answer": "S1 180 V3 [4,2]\nS3 270 V3 [4,3]\nS5 90 V2 [4,4]\nS6 270 V6 [3,2]", + "solutionText": "S1 180 V3 [4,2]\nS3 270 V3 [4,3]\nS5 90 V2 [4,4]\nS6 270 V6 [3,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-343\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S5: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S6: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-344.json b/voi/data/voi-344.json new file mode 100644 index 0000000000000000000000000000000000000000..a189e969d75e669dfa97c5db1a3381c228c87243 --- /dev/null +++ b/voi/data/voi-344.json @@ -0,0 +1,269 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 0, + 1 + ], + [ + 0, + 0 + ], + [ + 3, + 0 + ], + [ + 3, + 1 + ] + ] + }, + { + "polygon": [ + [ + 4, + 0 + ], + [ + 4, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 0 + ] + ] + }, + { + "polygon": [ + [ + 2, + 1 + ], + [ + 2, + 2 + ], + [ + 1, + 2 + ], + [ + 1, + 1 + ] + ] + }, + { + "polygon": [ + [ + 1, + 0 + ], + [ + 1, + 3 + ], + [ + 0, + 2 + ], + [ + 0, + 0 + ] + ] + } + ], + "meta": { + "seed": 4205045, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.209836, + "contourComplexity": 42, + "connectedComponents": 1, + "fillRatio": 0.117676, + "difficultyScore": 0.625304, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 345, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-344/target.png", + "shapes": { + "S1": "../images/voi-344/shape_S1.png", + "S2": "../images/voi-344/shape_S2.png", + "S3": "../images/voi-344/shape_S3.png", + "S4": "../images/voi-344/shape_S4.png", + "S5": "../images/voi-344/shape_S5.png", + "S6": "../images/voi-344/shape_S6.png" + } + }, + "ID": "voi-344", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 90, + "vertex": "V2", + "grid": [ + 0, + 0 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V4", + "grid": [ + 3, + 0 + ] + }, + { + "shape": "S5", + "angle": 270, + "vertex": "V3", + "grid": [ + 1, + 2 + ] + }, + { + "shape": "S6", + "angle": 270, + "vertex": "V4", + "grid": [ + 0, + 0 + ] + } + ] + }, + "legacy_answer": "S2 90 V2 [0,0]\nS3 270 V4 [3,0]\nS5 270 V3 [1,2]\nS6 270 V4 [0,0]", + "solutionText": "S2 90 V2 [0,0]\nS3 270 V4 [3,0]\nS5 270 V3 [1,2]\nS6 270 V4 [0,0]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-344\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S3: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S5: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S6: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-345.json b/voi/data/voi-345.json new file mode 100644 index 0000000000000000000000000000000000000000..c695c717b19072e99080783f562792d818b427d8 --- /dev/null +++ b/voi/data/voi-345.json @@ -0,0 +1,285 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 6 + ], + [ + 1, + 6 + ], + [ + 2, + 5 + ], + [ + 4, + 5 + ] + ] + }, + { + "polygon": [ + [ + 4, + 6 + ], + [ + 4, + 4 + ], + [ + 6, + 4 + ], + [ + 6, + 6 + ] + ] + }, + { + "polygon": [ + [ + 7, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 3 + ], + [ + 7, + 3 + ] + ] + }, + { + "polygon": [ + [ + 3, + 5 + ], + [ + 3, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 4 + ], + [ + 6, + 4 + ], + [ + 6, + 5 + ] + ] + } + ], + "meta": { + "seed": 4205046, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.241966, + "contourComplexity": 38, + "connectedComponents": 1, + "fillRatio": 0.195801, + "difficultyScore": 0.340535, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 346, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-345/target.png", + "shapes": { + "S1": "../images/voi-345/shape_S1.png", + "S2": "../images/voi-345/shape_S2.png", + "S3": "../images/voi-345/shape_S3.png", + "S4": "../images/voi-345/shape_S4.png", + "S5": "../images/voi-345/shape_S5.png", + "S6": "../images/voi-345/shape_S6.png" + } + }, + "ID": "voi-345", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V2", + "grid": [ + 1, + 6 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V1", + "grid": [ + 4, + 6 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V4", + "grid": [ + 7, + 3 + ] + }, + { + "shape": "S6", + "angle": 90, + "vertex": "V1", + "grid": [ + 3, + 5 + ] + } + ] + }, + "legacy_answer": "S1 180 V2 [1,6]\nS2 90 V1 [4,6]\nS3 180 V4 [7,3]\nS6 90 V1 [3,5]", + "solutionText": "S1 180 V2 [1,6]\nS2 90 V1 [4,6]\nS3 180 V4 [7,3]\nS6 90 V1 [3,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-345\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S5: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S6: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-346.json b/voi/data/voi-346.json new file mode 100644 index 0000000000000000000000000000000000000000..3bc28587bb64bbe6d08111f8c33730eeaf2ed074 --- /dev/null +++ b/voi/data/voi-346.json @@ -0,0 +1,269 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 7 + ], + [ + 6, + 6 + ], + [ + 7, + 6 + ], + [ + 7, + 7 + ] + ] + }, + { + "polygon": [ + [ + 6, + 5 + ], + [ + 6, + 3 + ], + [ + 8, + 3 + ], + [ + 8, + 5 + ] + ] + }, + { + "polygon": [ + [ + 5, + 7 + ], + [ + 5, + 5 + ], + [ + 7, + 5 + ], + [ + 7, + 7 + ] + ] + }, + { + "polygon": [ + [ + 4, + 6 + ], + [ + 7, + 6 + ], + [ + 7, + 8 + ], + [ + 4, + 8 + ] + ] + } + ], + "meta": { + "seed": 4205047, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.266667, + "contourComplexity": 15, + "connectedComponents": 1, + "fillRatio": 0.171875, + "difficultyScore": 0.289583, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 347, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-346/target.png", + "shapes": { + "S1": "../images/voi-346/shape_S1.png", + "S2": "../images/voi-346/shape_S2.png", + "S3": "../images/voi-346/shape_S3.png", + "S4": "../images/voi-346/shape_S4.png", + "S5": "../images/voi-346/shape_S5.png", + "S6": "../images/voi-346/shape_S6.png" + } + }, + "ID": "voi-346", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 90, + "vertex": "V4", + "grid": [ + 7, + 7 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V1", + "grid": [ + 6, + 5 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V2", + "grid": [ + 5, + 5 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V1", + "grid": [ + 4, + 6 + ] + } + ] + }, + "legacy_answer": "S2 90 V4 [7,7]\nS3 90 V1 [6,5]\nS4 90 V2 [5,5]\nS5 0 V1 [4,6]", + "solutionText": "S2 90 V4 [7,7]\nS3 90 V1 [6,5]\nS4 90 V2 [5,5]\nS5 0 V1 [4,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-346\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S2: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S6: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-347.json b/voi/data/voi-347.json new file mode 100644 index 0000000000000000000000000000000000000000..83dd864c713d3041335a2af1f0952ddd43d28287 --- /dev/null +++ b/voi/data/voi-347.json @@ -0,0 +1,273 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 7, + 3 + ], + [ + 7, + 0 + ], + [ + 8, + 0 + ], + [ + 8, + 3 + ] + ] + }, + { + "polygon": [ + [ + 7, + 5 + ], + [ + 5, + 5 + ], + [ + 5, + 4 + ], + [ + 6, + 4 + ], + [ + 6, + 2 + ], + [ + 7, + 2 + ] + ] + }, + { + "polygon": [ + [ + 4, + 2 + ], + [ + 6, + 2 + ], + [ + 4, + 4 + ] + ] + }, + { + "polygon": [ + [ + 4, + 4 + ], + [ + 6, + 4 + ], + [ + 6, + 5 + ], + [ + 4, + 5 + ] + ] + } + ], + "meta": { + "seed": 4205048, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.180791, + "contourComplexity": 74, + "connectedComponents": 1, + "fillRatio": 0.141602, + "difficultyScore": 0.693633, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 348, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-347/target.png", + "shapes": { + "S1": "../images/voi-347/shape_S1.png", + "S2": "../images/voi-347/shape_S2.png", + "S3": "../images/voi-347/shape_S3.png", + "S4": "../images/voi-347/shape_S4.png", + "S5": "../images/voi-347/shape_S5.png", + "S6": "../images/voi-347/shape_S6.png" + } + }, + "ID": "voi-347", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V1", + "grid": [ + 7, + 3 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V3", + "grid": [ + 5, + 4 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V3", + "grid": [ + 4, + 4 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V2", + "grid": [ + 6, + 4 + ] + } + ] + }, + "legacy_answer": "S1 90 V1 [7,3]\nS2 180 V3 [5,4]\nS4 0 V3 [4,4]\nS5 0 V2 [6,4]", + "solutionText": "S1 90 V1 [7,3]\nS2 180 V3 [5,4]\nS4 0 V3 [4,4]\nS5 0 V2 [6,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-347\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S6: V1=[0,0], V2=[1,0], V3=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-348.json b/voi/data/voi-348.json new file mode 100644 index 0000000000000000000000000000000000000000..01351fad9e9841a9ce7d9c500b01bad7a8b9ce74 --- /dev/null +++ b/voi/data/voi-348.json @@ -0,0 +1,261 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 0, + 2 + ], + [ + 2, + 2 + ], + [ + 0, + 4 + ] + ] + }, + { + "polygon": [ + [ + 1, + 6 + ], + [ + 1, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 6 + ] + ] + }, + { + "polygon": [ + [ + 1, + 6 + ], + [ + 1, + 3 + ], + [ + 2, + 4 + ], + [ + 2, + 6 + ] + ] + }, + { + "polygon": [ + [ + 1, + 8 + ], + [ + 1, + 5 + ], + [ + 2, + 6 + ], + [ + 2, + 8 + ] + ] + } + ], + "meta": { + "seed": 4205049, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.197531, + "contourComplexity": 132, + "connectedComponents": 1, + "fillRatio": 0.126953, + "difficultyScore": 0.65597, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 349, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-348/target.png", + "shapes": { + "S1": "../images/voi-348/shape_S1.png", + "S2": "../images/voi-348/shape_S2.png", + "S3": "../images/voi-348/shape_S3.png", + "S4": "../images/voi-348/shape_S4.png", + "S5": "../images/voi-348/shape_S5.png", + "S6": "../images/voi-348/shape_S6.png" + } + }, + "ID": "voi-348", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V2", + "grid": [ + 2, + 2 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V2", + "grid": [ + 1, + 5 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V2", + "grid": [ + 1, + 3 + ] + }, + { + "shape": "S6", + "angle": 90, + "vertex": "V1", + "grid": [ + 1, + 8 + ] + } + ] + }, + "legacy_answer": "S1 0 V2 [2,2]\nS2 90 V2 [1,5]\nS5 90 V2 [1,3]\nS6 90 V1 [1,8]", + "solutionText": "S1 0 V2 [2,2]\nS2 90 V2 [1,5]\nS5 90 V2 [1,3]\nS6 90 V1 [1,8]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-348\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S3: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S4: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S6: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-349.json b/voi/data/voi-349.json new file mode 100644 index 0000000000000000000000000000000000000000..55fc752675a7dec72ece0d9e0eeac8fbf59dafd4 --- /dev/null +++ b/voi/data/voi-349.json @@ -0,0 +1,269 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 7 + ], + [ + 0, + 7 + ], + [ + 0, + 5 + ], + [ + 2, + 5 + ] + ] + }, + { + "polygon": [ + [ + 3, + 3 + ], + [ + 3, + 5 + ], + [ + 1, + 5 + ], + [ + 1, + 3 + ] + ] + }, + { + "polygon": [ + [ + 0, + 7 + ], + [ + 3, + 7 + ], + [ + 2, + 8 + ], + [ + 0, + 8 + ] + ] + }, + { + "polygon": [ + [ + 1, + 4 + ], + [ + 1, + 6 + ], + [ + 0, + 6 + ], + [ + 0, + 4 + ] + ] + } + ], + "meta": { + "seed": 4205050, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.159601, + "contourComplexity": 44, + "connectedComponents": 1, + "fillRatio": 0.164551, + "difficultyScore": 0.732494, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 350, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-349/target.png", + "shapes": { + "S1": "../images/voi-349/shape_S1.png", + "S2": "../images/voi-349/shape_S2.png", + "S3": "../images/voi-349/shape_S3.png", + "S4": "../images/voi-349/shape_S4.png", + "S5": "../images/voi-349/shape_S5.png", + "S6": "../images/voi-349/shape_S6.png" + } + }, + "ID": "voi-349", + "answer": { + "placements": [ + { + "shape": "S3", + "angle": 180, + "vertex": "V1", + "grid": [ + 2, + 7 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V3", + "grid": [ + 1, + 5 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V3", + "grid": [ + 2, + 8 + ] + }, + { + "shape": "S6", + "angle": 270, + "vertex": "V4", + "grid": [ + 0, + 4 + ] + } + ] + }, + "legacy_answer": "S3 180 V1 [2,7]\nS4 270 V3 [1,5]\nS5 0 V3 [2,8]\nS6 270 V4 [0,4]", + "solutionText": "S3 180 V1 [2,7]\nS4 270 V3 [1,5]\nS5 0 V3 [2,8]\nS6 270 V4 [0,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-349\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S6: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-350.json b/voi/data/voi-350.json new file mode 100644 index 0000000000000000000000000000000000000000..a45a72381ff24740a0faaf9c077247f76f5c402d --- /dev/null +++ b/voi/data/voi-350.json @@ -0,0 +1,257 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 1 + ], + [ + 2, + 0 + ], + [ + 4, + 0 + ], + [ + 4, + 1 + ] + ] + }, + { + "polygon": [ + [ + 2, + 4 + ], + [ + 1, + 4 + ], + [ + 2, + 3 + ] + ] + }, + { + "polygon": [ + [ + 3, + 3 + ], + [ + 0, + 3 + ], + [ + 0, + 1 + ], + [ + 3, + 1 + ] + ] + }, + { + "polygon": [ + [ + 0, + 0 + ], + [ + 2, + 0 + ], + [ + 2, + 2 + ], + [ + 0, + 2 + ] + ] + } + ], + "meta": { + "seed": 4205051, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.319202, + "contourComplexity": 44, + "connectedComponents": 1, + "fillRatio": 0.133301, + "difficultyScore": 0.510206, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 351, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-350/target.png", + "shapes": { + "S1": "../images/voi-350/shape_S1.png", + "S2": "../images/voi-350/shape_S2.png", + "S3": "../images/voi-350/shape_S3.png", + "S4": "../images/voi-350/shape_S4.png", + "S5": "../images/voi-350/shape_S5.png", + "S6": "../images/voi-350/shape_S6.png" + } + }, + "ID": "voi-350", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V1", + "grid": [ + 2, + 1 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V3", + "grid": [ + 2, + 3 + ] + }, + { + "shape": "S5", + "angle": 180, + "vertex": "V1", + "grid": [ + 3, + 3 + ] + }, + { + "shape": "S6", + "angle": 0, + "vertex": "V1", + "grid": [ + 0, + 0 + ] + } + ] + }, + "legacy_answer": "S1 90 V1 [2,1]\nS4 180 V3 [2,3]\nS5 180 V1 [3,3]\nS6 0 V1 [0,0]", + "solutionText": "S1 90 V1 [2,1]\nS4 180 V3 [2,3]\nS5 180 V1 [3,3]\nS6 0 V1 [0,0]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-350\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S3: V1=[0,0], V2=[1,0], V3=[0,1]\n- S4: V1=[0,0], V2=[1,0], V3=[0,1]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S6: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-351.json b/voi/data/voi-351.json new file mode 100644 index 0000000000000000000000000000000000000000..b10ffb4459306ce87cf6bd7b9bb33bb284e77d52 --- /dev/null +++ b/voi/data/voi-351.json @@ -0,0 +1,281 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 6 + ], + [ + 1, + 6 + ], + [ + 1, + 4 + ], + [ + 4, + 4 + ] + ] + }, + { + "polygon": [ + [ + 1, + 4 + ], + [ + 1, + 5 + ], + [ + 0, + 4 + ] + ] + }, + { + "polygon": [ + [ + 3, + 5 + ], + [ + 3, + 7 + ], + [ + 2, + 7 + ], + [ + 2, + 6 + ], + [ + 0, + 6 + ], + [ + 0, + 5 + ] + ] + }, + { + "polygon": [ + [ + 1, + 8 + ], + [ + 1, + 5 + ], + [ + 2, + 5 + ], + [ + 2, + 8 + ] + ] + } + ], + "meta": { + "seed": 4205052, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.295612, + "contourComplexity": 46, + "connectedComponents": 1, + "fillRatio": 0.148926, + "difficultyScore": 0.384596, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 352, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-351/target.png", + "shapes": { + "S1": "../images/voi-351/shape_S1.png", + "S2": "../images/voi-351/shape_S2.png", + "S3": "../images/voi-351/shape_S3.png", + "S4": "../images/voi-351/shape_S4.png", + "S5": "../images/voi-351/shape_S5.png", + "S6": "../images/voi-351/shape_S6.png" + } + }, + "ID": "voi-351", + "answer": { + "placements": [ + { + "shape": "S3", + "angle": 180, + "vertex": "V4", + "grid": [ + 4, + 4 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V2", + "grid": [ + 1, + 5 + ] + }, + { + "shape": "S5", + "angle": 270, + "vertex": "V6", + "grid": [ + 0, + 5 + ] + }, + { + "shape": "S6", + "angle": 90, + "vertex": "V1", + "grid": [ + 1, + 8 + ] + } + ] + }, + "legacy_answer": "S3 180 V4 [4,4]\nS4 270 V2 [1,5]\nS5 270 V6 [0,5]\nS6 90 V1 [1,8]", + "solutionText": "S3 180 V4 [4,4]\nS4 270 V2 [1,5]\nS5 270 V6 [0,5]\nS6 90 V1 [1,8]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-351\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[0,1]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S6: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-352.json b/voi/data/voi-352.json new file mode 100644 index 0000000000000000000000000000000000000000..da2aeaa10d7270fd9cbcba9e968153ee2c0043f1 --- /dev/null +++ b/voi/data/voi-352.json @@ -0,0 +1,281 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 0, + 1 + ], + [ + 3, + 1 + ], + [ + 3, + 2 + ], + [ + 0, + 2 + ] + ] + }, + { + "polygon": [ + [ + 2, + 4 + ], + [ + 0, + 4 + ], + [ + 0, + 2 + ], + [ + 2, + 2 + ] + ] + }, + { + "polygon": [ + [ + 1, + 6 + ], + [ + 1, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 6 + ] + ] + }, + { + "polygon": [ + [ + 4, + 3 + ], + [ + 4, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 4 + ], + [ + 1, + 4 + ], + [ + 1, + 3 + ] + ] + } + ], + "meta": { + "seed": 4205053, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.235294, + "contourComplexity": 14, + "connectedComponents": 1, + "fillRatio": 0.203125, + "difficultyScore": 0.352574, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 353, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-352/target.png", + "shapes": { + "S1": "../images/voi-352/shape_S1.png", + "S2": "../images/voi-352/shape_S2.png", + "S3": "../images/voi-352/shape_S3.png", + "S4": "../images/voi-352/shape_S4.png", + "S5": "../images/voi-352/shape_S5.png", + "S6": "../images/voi-352/shape_S6.png" + } + }, + "ID": "voi-352", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V3", + "grid": [ + 3, + 2 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V2", + "grid": [ + 0, + 4 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V4", + "grid": [ + 3, + 6 + ] + }, + { + "shape": "S6", + "angle": 270, + "vertex": "V6", + "grid": [ + 1, + 3 + ] + } + ] + }, + "legacy_answer": "S1 0 V3 [3,2]\nS2 180 V2 [0,4]\nS3 90 V4 [3,6]\nS6 270 V6 [1,3]", + "solutionText": "S1 0 V3 [3,2]\nS2 180 V2 [0,4]\nS3 90 V4 [3,6]\nS6 270 V6 [1,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-352\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S5: V1=[0,0], V2=[2,0], V3=[0,2]\n- S6: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-353.json b/voi/data/voi-353.json new file mode 100644 index 0000000000000000000000000000000000000000..4cbced50975254c7083c287d1febb3e59cc267ef --- /dev/null +++ b/voi/data/voi-353.json @@ -0,0 +1,249 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 3 + ], + [ + 5, + 3 + ], + [ + 5, + 5 + ], + [ + 2, + 5 + ] + ] + }, + { + "polygon": [ + [ + 4, + 6 + ], + [ + 3, + 6 + ], + [ + 3, + 3 + ], + [ + 4, + 3 + ] + ] + }, + { + "polygon": [ + [ + 3, + 2 + ], + [ + 5, + 2 + ], + [ + 3, + 4 + ] + ] + }, + { + "polygon": [ + [ + 3, + 5 + ], + [ + 3, + 4 + ], + [ + 4, + 5 + ] + ] + } + ], + "meta": { + "seed": 4205054, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.345013, + "contourComplexity": 102, + "connectedComponents": 1, + "fillRatio": 0.118652, + "difficultyScore": 0.642749, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 354, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-353/target.png", + "shapes": { + "S1": "../images/voi-353/shape_S1.png", + "S2": "../images/voi-353/shape_S2.png", + "S3": "../images/voi-353/shape_S3.png", + "S4": "../images/voi-353/shape_S4.png", + "S5": "../images/voi-353/shape_S5.png", + "S6": "../images/voi-353/shape_S6.png" + } + }, + "ID": "voi-353", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V3", + "grid": [ + 5, + 5 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V3", + "grid": [ + 3, + 3 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V1", + "grid": [ + 3, + 2 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V2", + "grid": [ + 3, + 4 + ] + } + ] + }, + "legacy_answer": "S1 0 V3 [5,5]\nS2 180 V3 [3,3]\nS4 0 V1 [3,2]\nS5 90 V2 [3,4]", + "solutionText": "S1 0 V3 [5,5]\nS2 180 V3 [3,3]\nS4 0 V1 [3,2]\nS5 90 V2 [3,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-353\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S3: V1=[0,0], V2=[1,0], V3=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n- S5: V1=[0,0], V2=[1,0], V3=[0,1]\n- S6: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-354.json b/voi/data/voi-354.json new file mode 100644 index 0000000000000000000000000000000000000000..15eb7aafa05600a8e29cb575ab06febb1d720a3e --- /dev/null +++ b/voi/data/voi-354.json @@ -0,0 +1,265 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 7, + 3 + ], + [ + 7, + 5 + ], + [ + 5, + 3 + ] + ] + }, + { + "polygon": [ + [ + 5, + 5 + ], + [ + 8, + 5 + ], + [ + 8, + 7 + ], + [ + 5, + 7 + ] + ] + }, + { + "polygon": [ + [ + 7, + 4 + ], + [ + 8, + 4 + ], + [ + 8, + 5 + ], + [ + 7, + 5 + ] + ] + }, + { + "polygon": [ + [ + 5, + 3 + ], + [ + 7, + 3 + ], + [ + 7, + 5 + ], + [ + 5, + 5 + ] + ] + } + ], + "meta": { + "seed": 4205055, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.315789, + "contourComplexity": 68, + "connectedComponents": 1, + "fillRatio": 0.139648, + "difficultyScore": 0.483861, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 355, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-354/target.png", + "shapes": { + "S1": "../images/voi-354/shape_S1.png", + "S2": "../images/voi-354/shape_S2.png", + "S3": "../images/voi-354/shape_S3.png", + "S4": "../images/voi-354/shape_S4.png", + "S5": "../images/voi-354/shape_S5.png", + "S6": "../images/voi-354/shape_S6.png" + } + }, + "ID": "voi-354", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V3", + "grid": [ + 5, + 3 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V1", + "grid": [ + 5, + 5 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V2", + "grid": [ + 8, + 4 + ] + }, + { + "shape": "S6", + "angle": 0, + "vertex": "V4", + "grid": [ + 5, + 5 + ] + } + ] + }, + "legacy_answer": "S1 270 V3 [5,3]\nS2 0 V1 [5,5]\nS3 0 V2 [8,4]\nS6 0 V4 [5,5]", + "solutionText": "S1 270 V3 [5,3]\nS2 0 V1 [5,5]\nS3 0 V2 [8,4]\nS6 0 V4 [5,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-354\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S4: V1=[0,0], V2=[1,0], V3=[0,1]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S6: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-355.json b/voi/data/voi-355.json new file mode 100644 index 0000000000000000000000000000000000000000..07bbbb1b5798d5c80257a8facc744f0e12b63030 --- /dev/null +++ b/voi/data/voi-355.json @@ -0,0 +1,277 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 2 + ], + [ + 5, + 5 + ], + [ + 4, + 4 + ], + [ + 4, + 2 + ] + ] + }, + { + "polygon": [ + [ + 7, + 5 + ], + [ + 7, + 6 + ], + [ + 6, + 6 + ], + [ + 6, + 5 + ] + ] + }, + { + "polygon": [ + [ + 5, + 5 + ], + [ + 5, + 3 + ], + [ + 7, + 3 + ], + [ + 7, + 5 + ] + ] + }, + { + "polygon": [ + [ + 7, + 3 + ], + [ + 7, + 4 + ], + [ + 6, + 4 + ], + [ + 6, + 3 + ] + ] + } + ], + "meta": { + "seed": 4205056, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.234432, + "contourComplexity": 40, + "connectedComponents": 1, + "fillRatio": 0.102051, + "difficultyScore": 0.558169, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 356, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-355/target.png", + "shapes": { + "S1": "../images/voi-355/shape_S1.png", + "S2": "../images/voi-355/shape_S2.png", + "S3": "../images/voi-355/shape_S3.png", + "S4": "../images/voi-355/shape_S4.png", + "S5": "../images/voi-355/shape_S5.png", + "S6": "../images/voi-355/shape_S6.png" + } + }, + "ID": "voi-355", + "answer": { + "placements": [ + { + "shape": "S3", + "angle": 270, + "vertex": "V1", + "grid": [ + 5, + 2 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V4", + "grid": [ + 6, + 5 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V4", + "grid": [ + 7, + 5 + ] + }, + { + "shape": "S6", + "angle": 270, + "vertex": "V4", + "grid": [ + 6, + 3 + ] + } + ] + }, + "legacy_answer": "S3 270 V1 [5,2]\nS4 270 V4 [6,5]\nS5 90 V4 [7,5]\nS6 270 V4 [6,3]", + "solutionText": "S3 270 V1 [5,2]\nS4 270 V4 [6,5]\nS5 90 V4 [7,5]\nS6 270 V4 [6,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-355\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S5: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S6: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-356.json b/voi/data/voi-356.json new file mode 100644 index 0000000000000000000000000000000000000000..1d6939ab98f3660e598ef35e0ada719be1bf2bab --- /dev/null +++ b/voi/data/voi-356.json @@ -0,0 +1,289 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 3 + ], + [ + 4, + 1 + ], + [ + 6, + 1 + ], + [ + 6, + 3 + ] + ] + }, + { + "polygon": [ + [ + 5, + 3 + ], + [ + 8, + 3 + ], + [ + 8, + 4 + ], + [ + 5, + 4 + ] + ] + }, + { + "polygon": [ + [ + 7, + 2 + ], + [ + 7, + 5 + ], + [ + 6, + 5 + ], + [ + 6, + 2 + ] + ] + }, + { + "polygon": [ + [ + 6, + 1 + ], + [ + 8, + 1 + ], + [ + 8, + 2 + ], + [ + 7, + 2 + ], + [ + 7, + 4 + ], + [ + 6, + 4 + ] + ] + } + ], + "meta": { + "seed": 4205057, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "contourComplexity": 14, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.330357, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 357, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-356/target.png", + "shapes": { + "S1": "../images/voi-356/shape_S1.png", + "S2": "../images/voi-356/shape_S2.png", + "S3": "../images/voi-356/shape_S3.png", + "S4": "../images/voi-356/shape_S4.png", + "S5": "../images/voi-356/shape_S5.png", + "S6": "../images/voi-356/shape_S6.png" + } + }, + "ID": "voi-356", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V3", + "grid": [ + 6, + 1 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V3", + "grid": [ + 8, + 4 + ] + }, + { + "shape": "S5", + "angle": 270, + "vertex": "V2", + "grid": [ + 7, + 5 + ] + }, + { + "shape": "S6", + "angle": 0, + "vertex": "V6", + "grid": [ + 6, + 4 + ] + } + ] + }, + "legacy_answer": "S1 90 V3 [6,1]\nS4 0 V3 [8,4]\nS5 270 V2 [7,5]\nS6 0 V6 [6,4]", + "solutionText": "S1 90 V3 [6,1]\nS4 0 V3 [8,4]\nS5 270 V2 [7,5]\nS6 0 V6 [6,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-356\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S5: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S6: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-357.json b/voi/data/voi-357.json new file mode 100644 index 0000000000000000000000000000000000000000..1b244ca593e2aca2a41195660abb7bddcfcb65eb --- /dev/null +++ b/voi/data/voi-357.json @@ -0,0 +1,269 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 6 + ], + [ + 2, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 6 + ] + ] + }, + { + "polygon": [ + [ + 4, + 5 + ], + [ + 4, + 2 + ], + [ + 5, + 3 + ], + [ + 5, + 5 + ] + ] + }, + { + "polygon": [ + [ + 1, + 6 + ], + [ + 1, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 6 + ] + ] + }, + { + "polygon": [ + [ + 2, + 5 + ], + [ + 5, + 5 + ], + [ + 4, + 6 + ], + [ + 2, + 6 + ] + ] + } + ], + "meta": { + "seed": 4205058, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.198758, + "contourComplexity": 68, + "connectedComponents": 1, + "fillRatio": 0.125977, + "difficultyScore": 0.653016, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 358, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-357/target.png", + "shapes": { + "S1": "../images/voi-357/shape_S1.png", + "S2": "../images/voi-357/shape_S2.png", + "S3": "../images/voi-357/shape_S3.png", + "S4": "../images/voi-357/shape_S4.png", + "S5": "../images/voi-357/shape_S5.png", + "S6": "../images/voi-357/shape_S6.png" + } + }, + "ID": "voi-357", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V2", + "grid": [ + 2, + 5 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V2", + "grid": [ + 4, + 2 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V1", + "grid": [ + 1, + 6 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V1", + "grid": [ + 2, + 5 + ] + } + ] + }, + "legacy_answer": "S1 90 V2 [2,5]\nS2 90 V2 [4,2]\nS4 90 V1 [1,6]\nS5 0 V1 [2,5]", + "solutionText": "S1 90 V2 [2,5]\nS2 90 V2 [4,2]\nS4 90 V1 [1,6]\nS5 0 V1 [2,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-357\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S6: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-358.json b/voi/data/voi-358.json new file mode 100644 index 0000000000000000000000000000000000000000..46bfd70e0409b5c756680d63d5123d6491e55d60 --- /dev/null +++ b/voi/data/voi-358.json @@ -0,0 +1,253 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 3 + ], + [ + 5, + 5 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 4, + 3 + ], + [ + 4, + 1 + ], + [ + 6, + 3 + ] + ] + }, + { + "polygon": [ + [ + 5, + 3 + ], + [ + 5, + 0 + ], + [ + 7, + 0 + ], + [ + 7, + 3 + ] + ] + }, + { + "polygon": [ + [ + 8, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 2 + ], + [ + 8, + 2 + ] + ] + } + ], + "meta": { + "seed": 4205059, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.248062, + "contourComplexity": 138, + "connectedComponents": 1, + "fillRatio": 0.189453, + "difficultyScore": 0.328846, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 359, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-358/target.png", + "shapes": { + "S1": "../images/voi-358/shape_S1.png", + "S2": "../images/voi-358/shape_S2.png", + "S3": "../images/voi-358/shape_S3.png", + "S4": "../images/voi-358/shape_S4.png", + "S5": "../images/voi-358/shape_S5.png", + "S6": "../images/voi-358/shape_S6.png" + } + }, + "ID": "voi-358", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 270, + "vertex": "V2", + "grid": [ + 5, + 5 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V2", + "grid": [ + 4, + 1 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V2", + "grid": [ + 5, + 0 + ] + }, + { + "shape": "S5", + "angle": 180, + "vertex": "V4", + "grid": [ + 8, + 2 + ] + } + ] + }, + "legacy_answer": "S2 270 V2 [5,5]\nS3 90 V2 [4,1]\nS4 90 V2 [5,0]\nS5 180 V4 [8,2]", + "solutionText": "S2 270 V2 [5,5]\nS3 90 V2 [4,1]\nS4 90 V2 [5,0]\nS5 180 V4 [8,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-358\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S6: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-359.json b/voi/data/voi-359.json new file mode 100644 index 0000000000000000000000000000000000000000..52b8b7a2fbdbc4d18b7d8a5ecb4e5fa98efba109 --- /dev/null +++ b/voi/data/voi-359.json @@ -0,0 +1,261 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 3 + ], + [ + 3, + 6 + ], + [ + 1, + 6 + ], + [ + 1, + 3 + ] + ] + }, + { + "polygon": [ + [ + 2, + 5 + ], + [ + 2, + 8 + ], + [ + 0, + 8 + ], + [ + 0, + 5 + ] + ] + }, + { + "polygon": [ + [ + 0, + 3 + ], + [ + 0, + 1 + ], + [ + 2, + 3 + ] + ] + }, + { + "polygon": [ + [ + 2, + 7 + ], + [ + 1, + 7 + ], + [ + 1, + 5 + ], + [ + 2, + 5 + ] + ] + } + ], + "meta": { + "seed": 4205060, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.249027, + "contourComplexity": 76, + "connectedComponents": 1, + "fillRatio": 0.188477, + "difficultyScore": 0.326938, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 360, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-359/target.png", + "shapes": { + "S1": "../images/voi-359/shape_S1.png", + "S2": "../images/voi-359/shape_S2.png", + "S3": "../images/voi-359/shape_S3.png", + "S4": "../images/voi-359/shape_S4.png", + "S5": "../images/voi-359/shape_S5.png", + "S6": "../images/voi-359/shape_S6.png" + } + }, + "ID": "voi-359", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V1", + "grid": [ + 3, + 3 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V3", + "grid": [ + 0, + 8 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V3", + "grid": [ + 2, + 3 + ] + }, + { + "shape": "S5", + "angle": 180, + "vertex": "V2", + "grid": [ + 1, + 7 + ] + } + ] + }, + "legacy_answer": "S1 270 V1 [3,3]\nS3 270 V3 [0,8]\nS4 90 V3 [2,3]\nS5 180 V2 [1,7]", + "solutionText": "S1 270 V1 [3,3]\nS3 270 V3 [0,8]\nS4 90 V3 [2,3]\nS5 180 V2 [1,7]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-359\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n- S5: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S6: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-360.json b/voi/data/voi-360.json new file mode 100644 index 0000000000000000000000000000000000000000..49dd272a5f8474a55137e89a52dc3ce777e8529b --- /dev/null +++ b/voi/data/voi-360.json @@ -0,0 +1,261 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 4 + ], + [ + 2, + 6 + ], + [ + 0, + 6 + ], + [ + 0, + 4 + ] + ] + }, + { + "polygon": [ + [ + 4, + 2 + ], + [ + 4, + 5 + ], + [ + 2, + 5 + ], + [ + 2, + 2 + ] + ] + }, + { + "polygon": [ + [ + 5, + 3 + ], + [ + 5, + 5 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 5, + 1 + ], + [ + 5, + 4 + ], + [ + 4, + 4 + ], + [ + 4, + 1 + ] + ] + } + ], + "meta": { + "seed": 4205061, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.20332, + "contourComplexity": 76, + "connectedComponents": 1, + "fillRatio": 0.1875, + "difficultyScore": 0.511722, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 361, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-360/target.png", + "shapes": { + "S1": "../images/voi-360/shape_S1.png", + "S2": "../images/voi-360/shape_S2.png", + "S3": "../images/voi-360/shape_S3.png", + "S4": "../images/voi-360/shape_S4.png", + "S5": "../images/voi-360/shape_S5.png", + "S6": "../images/voi-360/shape_S6.png" + } + }, + "ID": "voi-360", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V1", + "grid": [ + 2, + 4 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V3", + "grid": [ + 2, + 5 + ] + }, + { + "shape": "S5", + "angle": 270, + "vertex": "V3", + "grid": [ + 3, + 3 + ] + }, + { + "shape": "S6", + "angle": 270, + "vertex": "V4", + "grid": [ + 4, + 1 + ] + } + ] + }, + "legacy_answer": "S1 270 V1 [2,4]\nS4 270 V3 [2,5]\nS5 270 V3 [3,3]\nS6 270 V4 [4,1]", + "solutionText": "S1 270 V1 [2,4]\nS4 270 V3 [2,5]\nS5 270 V3 [3,3]\nS6 270 V4 [4,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-360\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S3: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[0,2]\n- S6: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-361.json b/voi/data/voi-361.json new file mode 100644 index 0000000000000000000000000000000000000000..b3ed91111684d28db20f4c4b0add113ee664a04e --- /dev/null +++ b/voi/data/voi-361.json @@ -0,0 +1,249 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 1 + ], + [ + 6, + 4 + ], + [ + 5, + 3 + ], + [ + 5, + 1 + ] + ] + }, + { + "polygon": [ + [ + 6, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 2 + ], + [ + 6, + 2 + ] + ] + }, + { + "polygon": [ + [ + 6, + 2 + ], + [ + 6, + 3 + ], + [ + 5, + 2 + ] + ] + }, + { + "polygon": [ + [ + 4, + 1 + ], + [ + 4, + 2 + ], + [ + 3, + 1 + ] + ] + } + ], + "meta": { + "seed": 4205062, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.319218, + "contourComplexity": 102, + "connectedComponents": 1, + "fillRatio": 0.102051, + "difficultyScore": 0.572771, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 362, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-361/target.png", + "shapes": { + "S1": "../images/voi-361/shape_S1.png", + "S2": "../images/voi-361/shape_S2.png", + "S3": "../images/voi-361/shape_S3.png", + "S4": "../images/voi-361/shape_S4.png", + "S5": "../images/voi-361/shape_S5.png", + "S6": "../images/voi-361/shape_S6.png" + } + }, + "ID": "voi-361", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 270, + "vertex": "V4", + "grid": [ + 5, + 1 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V4", + "grid": [ + 6, + 2 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V2", + "grid": [ + 6, + 3 + ] + }, + { + "shape": "S5", + "angle": 270, + "vertex": "V2", + "grid": [ + 4, + 2 + ] + } + ] + }, + "legacy_answer": "S2 270 V4 [5,1]\nS3 180 V4 [6,2]\nS4 270 V2 [6,3]\nS5 270 V2 [4,2]", + "solutionText": "S2 270 V4 [5,1]\nS3 180 V4 [6,2]\nS4 270 V2 [6,3]\nS5 270 V2 [4,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-361\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[0,1]\n- S5: V1=[0,0], V2=[1,0], V3=[0,1]\n- S6: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-362.json b/voi/data/voi-362.json new file mode 100644 index 0000000000000000000000000000000000000000..7ed9b3b0c58a800d89abafbc19968e0d37191f06 --- /dev/null +++ b/voi/data/voi-362.json @@ -0,0 +1,293 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 4 + ], + [ + 6, + 4 + ], + [ + 6, + 6 + ], + [ + 4, + 6 + ] + ] + }, + { + "polygon": [ + [ + 5, + 4 + ], + [ + 8, + 4 + ], + [ + 7, + 5 + ], + [ + 5, + 5 + ] + ] + }, + { + "polygon": [ + [ + 5, + 3 + ], + [ + 6, + 3 + ], + [ + 6, + 6 + ], + [ + 5, + 6 + ] + ] + }, + { + "polygon": [ + [ + 8, + 5 + ], + [ + 8, + 7 + ], + [ + 7, + 7 + ], + [ + 7, + 6 + ], + [ + 5, + 6 + ], + [ + 5, + 5 + ] + ] + } + ], + "meta": { + "seed": 4205063, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.295612, + "contourComplexity": 42, + "connectedComponents": 1, + "fillRatio": 0.148926, + "difficultyScore": 0.384596, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 363, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-362/target.png", + "shapes": { + "S1": "../images/voi-362/shape_S1.png", + "S2": "../images/voi-362/shape_S2.png", + "S3": "../images/voi-362/shape_S3.png", + "S4": "../images/voi-362/shape_S4.png", + "S5": "../images/voi-362/shape_S5.png", + "S6": "../images/voi-362/shape_S6.png" + } + }, + "ID": "voi-362", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 0, + "vertex": "V3", + "grid": [ + 6, + 6 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V4", + "grid": [ + 5, + 5 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V4", + "grid": [ + 5, + 6 + ] + }, + { + "shape": "S6", + "angle": 270, + "vertex": "V2", + "grid": [ + 8, + 7 + ] + } + ] + }, + "legacy_answer": "S2 0 V3 [6,6]\nS4 0 V4 [5,5]\nS5 0 V4 [5,6]\nS6 270 V2 [8,7]", + "solutionText": "S2 0 V3 [6,6]\nS4 0 V4 [5,5]\nS5 0 V4 [5,6]\nS6 270 V2 [8,7]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-362\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S5: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S6: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-363.json b/voi/data/voi-363.json new file mode 100644 index 0000000000000000000000000000000000000000..0ea3b31df78d07a9361efd7055ca52a95085966a --- /dev/null +++ b/voi/data/voi-363.json @@ -0,0 +1,273 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 3 + ], + [ + 8, + 3 + ], + [ + 8, + 5 + ], + [ + 5, + 5 + ] + ] + }, + { + "polygon": [ + [ + 7, + 6 + ], + [ + 5, + 6 + ], + [ + 7, + 4 + ] + ] + }, + { + "polygon": [ + [ + 5, + 6 + ], + [ + 3, + 6 + ], + [ + 3, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 3 + ], + [ + 5, + 3 + ] + ] + }, + { + "polygon": [ + [ + 5, + 5 + ], + [ + 2, + 5 + ], + [ + 2, + 3 + ], + [ + 5, + 3 + ] + ] + } + ], + "meta": { + "seed": 4205064, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.280277, + "contourComplexity": 79, + "connectedComponents": 1, + "fillRatio": 0.203125, + "difficultyScore": 0.214857, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 364, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-363/target.png", + "shapes": { + "S1": "../images/voi-363/shape_S1.png", + "S2": "../images/voi-363/shape_S2.png", + "S3": "../images/voi-363/shape_S3.png", + "S4": "../images/voi-363/shape_S4.png", + "S5": "../images/voi-363/shape_S5.png", + "S6": "../images/voi-363/shape_S6.png" + } + }, + "ID": "voi-363", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 0, + "vertex": "V3", + "grid": [ + 8, + 5 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V1", + "grid": [ + 7, + 6 + ] + }, + { + "shape": "S5", + "angle": 180, + "vertex": "V5", + "grid": [ + 4, + 3 + ] + }, + { + "shape": "S6", + "angle": 180, + "vertex": "V3", + "grid": [ + 2, + 3 + ] + } + ] + }, + "legacy_answer": "S2 0 V3 [8,5]\nS4 180 V1 [7,6]\nS5 180 V5 [4,3]\nS6 180 V3 [2,3]", + "solutionText": "S2 0 V3 [8,5]\nS4 180 V1 [7,6]\nS5 180 V5 [4,3]\nS6 180 V3 [2,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-363\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S6: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-364.json b/voi/data/voi-364.json new file mode 100644 index 0000000000000000000000000000000000000000..c700e96374c645e6672d2d8bf100e1d794003003 --- /dev/null +++ b/voi/data/voi-364.json @@ -0,0 +1,281 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 2 + ], + [ + 4, + 5 + ], + [ + 3, + 4 + ], + [ + 3, + 2 + ] + ] + }, + { + "polygon": [ + [ + 5, + 6 + ], + [ + 5, + 3 + ], + [ + 6, + 4 + ], + [ + 6, + 6 + ] + ] + }, + { + "polygon": [ + [ + 5, + 1 + ], + [ + 5, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 1 + ] + ] + }, + { + "polygon": [ + [ + 4, + 2 + ], + [ + 4, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 3 + ], + [ + 1, + 3 + ], + [ + 1, + 2 + ] + ] + } + ], + "meta": { + "seed": 4205065, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.26556, + "contourComplexity": 74, + "connectedComponents": 1, + "fillRatio": 0.172852, + "difficultyScore": 0.292056, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 365, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-364/target.png", + "shapes": { + "S1": "../images/voi-364/shape_S1.png", + "S2": "../images/voi-364/shape_S2.png", + "S3": "../images/voi-364/shape_S3.png", + "S4": "../images/voi-364/shape_S4.png", + "S5": "../images/voi-364/shape_S5.png", + "S6": "../images/voi-364/shape_S6.png" + } + }, + "ID": "voi-364", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 270, + "vertex": "V4", + "grid": [ + 3, + 2 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V3", + "grid": [ + 6, + 4 + ] + }, + { + "shape": "S5", + "angle": 270, + "vertex": "V3", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S6", + "angle": 270, + "vertex": "V3", + "grid": [ + 3, + 4 + ] + } + ] + }, + "legacy_answer": "S2 270 V4 [3,2]\nS3 90 V3 [6,4]\nS5 270 V3 [3,4]\nS6 270 V3 [3,4]", + "solutionText": "S2 270 V4 [3,2]\nS3 90 V3 [6,4]\nS5 270 V3 [3,4]\nS6 270 V3 [3,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-364\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[1,0], V3=[0,1]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S6: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-365.json b/voi/data/voi-365.json new file mode 100644 index 0000000000000000000000000000000000000000..fe00508af33bdd1d4c536d863d943105d7da99d6 --- /dev/null +++ b/voi/data/voi-365.json @@ -0,0 +1,269 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 4 + ], + [ + 7, + 4 + ], + [ + 7, + 6 + ], + [ + 4, + 6 + ] + ] + }, + { + "polygon": [ + [ + 3, + 6 + ], + [ + 5, + 6 + ], + [ + 3, + 8 + ] + ] + }, + { + "polygon": [ + [ + 2, + 7 + ], + [ + 2, + 6 + ], + [ + 5, + 6 + ], + [ + 5, + 7 + ] + ] + }, + { + "polygon": [ + [ + 6, + 8 + ], + [ + 3, + 8 + ], + [ + 3, + 6 + ], + [ + 6, + 6 + ] + ] + } + ], + "meta": { + "seed": 4205066, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.296703, + "contourComplexity": 72, + "connectedComponents": 1, + "fillRatio": 0.1875, + "difficultyScore": 0.311813, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 366, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-365/target.png", + "shapes": { + "S1": "../images/voi-365/shape_S1.png", + "S2": "../images/voi-365/shape_S2.png", + "S3": "../images/voi-365/shape_S3.png", + "S4": "../images/voi-365/shape_S4.png", + "S5": "../images/voi-365/shape_S5.png", + "S6": "../images/voi-365/shape_S6.png" + } + }, + "ID": "voi-365", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 0, + "vertex": "V3", + "grid": [ + 7, + 6 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V2", + "grid": [ + 5, + 6 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V3", + "grid": [ + 5, + 6 + ] + }, + { + "shape": "S6", + "angle": 180, + "vertex": "V3", + "grid": [ + 3, + 6 + ] + } + ] + }, + "legacy_answer": "S2 0 V3 [7,6]\nS4 0 V2 [5,6]\nS5 90 V3 [5,6]\nS6 180 V3 [3,6]", + "solutionText": "S2 0 V3 [7,6]\nS4 0 V2 [5,6]\nS5 90 V3 [5,6]\nS6 180 V3 [3,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-365\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n- S5: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S6: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-366.json b/voi/data/voi-366.json new file mode 100644 index 0000000000000000000000000000000000000000..fd71c283d3e9160a8b4f29bec006fa279d324791 --- /dev/null +++ b/voi/data/voi-366.json @@ -0,0 +1,261 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 2 + ], + [ + 4, + 2 + ] + ] + }, + { + "polygon": [ + [ + 6, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 1 + ], + [ + 6, + 1 + ] + ] + }, + { + "polygon": [ + [ + 1, + 4 + ], + [ + 4, + 4 + ], + [ + 4, + 5 + ], + [ + 1, + 5 + ] + ] + }, + { + "polygon": [ + [ + 4, + 4 + ], + [ + 4, + 5 + ], + [ + 3, + 4 + ] + ] + } + ], + "meta": { + "seed": 4205067, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.189911, + "contourComplexity": 42, + "connectedComponents": 1, + "fillRatio": 0.133301, + "difficultyScore": 0.673755, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 367, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-366/target.png", + "shapes": { + "S1": "../images/voi-366/shape_S1.png", + "S2": "../images/voi-366/shape_S2.png", + "S3": "../images/voi-366/shape_S3.png", + "S4": "../images/voi-366/shape_S4.png", + "S5": "../images/voi-366/shape_S5.png", + "S6": "../images/voi-366/shape_S6.png" + } + }, + "ID": "voi-366", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V4", + "grid": [ + 4, + 2 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V3", + "grid": [ + 4, + 1 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V4", + "grid": [ + 1, + 5 + ] + }, + { + "shape": "S5", + "angle": 270, + "vertex": "V3", + "grid": [ + 3, + 4 + ] + } + ] + }, + "legacy_answer": "S1 180 V4 [4,2]\nS2 180 V3 [4,1]\nS3 0 V4 [1,5]\nS5 270 V3 [3,4]", + "solutionText": "S1 180 V4 [4,2]\nS2 180 V3 [4,1]\nS3 0 V4 [1,5]\nS5 270 V3 [3,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-366\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S4: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S5: V1=[0,0], V2=[1,0], V3=[0,1]\n- S6: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-367.json b/voi/data/voi-367.json new file mode 100644 index 0000000000000000000000000000000000000000..847aaf1b2bc80c662fd954ae7badb78d9d6e62d0 --- /dev/null +++ b/voi/data/voi-367.json @@ -0,0 +1,273 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 8, + 1 + ], + [ + 8, + 2 + ], + [ + 5, + 2 + ], + [ + 5, + 1 + ] + ] + }, + { + "polygon": [ + [ + 8, + 5 + ], + [ + 5, + 5 + ], + [ + 5, + 3 + ], + [ + 8, + 3 + ] + ] + }, + { + "polygon": [ + [ + 5, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 2 + ], + [ + 5, + 2 + ] + ] + }, + { + "polygon": [ + [ + 3, + 3 + ], + [ + 3, + 2 + ], + [ + 6, + 2 + ], + [ + 6, + 3 + ] + ] + } + ], + "meta": { + "seed": 4205068, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.25, + "contourComplexity": 12, + "connectedComponents": 1, + "fillRatio": 0.1875, + "difficultyScore": 0.325, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 368, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-367/target.png", + "shapes": { + "S1": "../images/voi-367/shape_S1.png", + "S2": "../images/voi-367/shape_S2.png", + "S3": "../images/voi-367/shape_S3.png", + "S4": "../images/voi-367/shape_S4.png", + "S5": "../images/voi-367/shape_S5.png", + "S6": "../images/voi-367/shape_S6.png" + } + }, + "ID": "voi-367", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V4", + "grid": [ + 5, + 1 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V1", + "grid": [ + 8, + 5 + ] + }, + { + "shape": "S5", + "angle": 180, + "vertex": "V3", + "grid": [ + 3, + 2 + ] + }, + { + "shape": "S6", + "angle": 90, + "vertex": "V1", + "grid": [ + 3, + 3 + ] + } + ] + }, + "legacy_answer": "S1 270 V4 [5,1]\nS4 180 V1 [8,5]\nS5 180 V3 [3,2]\nS6 90 V1 [3,3]", + "solutionText": "S1 270 V4 [5,1]\nS4 180 V1 [8,5]\nS5 180 V3 [3,2]\nS6 90 V1 [3,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-367\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[1,0], V3=[0,1]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S6: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-368.json b/voi/data/voi-368.json new file mode 100644 index 0000000000000000000000000000000000000000..9cd57ef5df4aa0d538f6844295d65d4a457c8ad3 --- /dev/null +++ b/voi/data/voi-368.json @@ -0,0 +1,277 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 7, + 4 + ], + [ + 5, + 4 + ], + [ + 7, + 2 + ] + ] + }, + { + "polygon": [ + [ + 6, + 4 + ], + [ + 6, + 7 + ], + [ + 4, + 7 + ], + [ + 4, + 4 + ] + ] + }, + { + "polygon": [ + [ + 5, + 3 + ], + [ + 5, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 4 + ], + [ + 2, + 4 + ], + [ + 2, + 3 + ] + ] + }, + { + "polygon": [ + [ + 5, + 6 + ], + [ + 5, + 7 + ], + [ + 4, + 7 + ], + [ + 4, + 6 + ] + ] + } + ], + "meta": { + "seed": 4205069, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.30622, + "contourComplexity": 76, + "connectedComponents": 1, + "fillRatio": 0.141602, + "difficultyScore": 0.441677, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 369, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-368/target.png", + "shapes": { + "S1": "../images/voi-368/shape_S1.png", + "S2": "../images/voi-368/shape_S2.png", + "S3": "../images/voi-368/shape_S3.png", + "S4": "../images/voi-368/shape_S4.png", + "S5": "../images/voi-368/shape_S5.png", + "S6": "../images/voi-368/shape_S6.png" + } + }, + "ID": "voi-368", + "answer": { + "placements": [ + { + "shape": "S3", + "angle": 180, + "vertex": "V2", + "grid": [ + 5, + 4 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V2", + "grid": [ + 6, + 7 + ] + }, + { + "shape": "S5", + "angle": 270, + "vertex": "V4", + "grid": [ + 4, + 4 + ] + }, + { + "shape": "S6", + "angle": 270, + "vertex": "V4", + "grid": [ + 4, + 6 + ] + } + ] + }, + "legacy_answer": "S3 180 V2 [5,4]\nS4 270 V2 [6,7]\nS5 270 V4 [4,4]\nS6 270 V4 [4,6]", + "solutionText": "S3 180 V2 [5,4]\nS4 270 V2 [6,7]\nS5 270 V4 [4,4]\nS6 270 V4 [4,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-368\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S6: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-369.json b/voi/data/voi-369.json new file mode 100644 index 0000000000000000000000000000000000000000..db76400d73382b917018fa711cedfd074ee6ffcd --- /dev/null +++ b/voi/data/voi-369.json @@ -0,0 +1,297 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 6 + ], + [ + 5, + 6 + ], + [ + 5, + 7 + ], + [ + 3, + 7 + ] + ] + }, + { + "polygon": [ + [ + 3, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 7 + ], + [ + 3, + 7 + ] + ] + }, + { + "polygon": [ + [ + 3, + 8 + ], + [ + 3, + 6 + ], + [ + 4, + 6 + ], + [ + 4, + 7 + ], + [ + 6, + 7 + ], + [ + 6, + 8 + ] + ] + }, + { + "polygon": [ + [ + 6, + 6 + ], + [ + 5, + 6 + ], + [ + 5, + 4 + ], + [ + 6, + 4 + ] + ] + } + ], + "meta": { + "seed": 4205070, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.166667, + "contourComplexity": 12, + "connectedComponents": 1, + "fillRatio": 0.15625, + "difficultyScore": 0.720833, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 370, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-369/target.png", + "shapes": { + "S1": "../images/voi-369/shape_S1.png", + "S2": "../images/voi-369/shape_S2.png", + "S3": "../images/voi-369/shape_S3.png", + "S4": "../images/voi-369/shape_S4.png", + "S5": "../images/voi-369/shape_S5.png", + "S6": "../images/voi-369/shape_S6.png" + } + }, + "ID": "voi-369", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V2", + "grid": [ + 5, + 6 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V3", + "grid": [ + 5, + 5 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V3", + "grid": [ + 4, + 6 + ] + }, + { + "shape": "S6", + "angle": 180, + "vertex": "V3", + "grid": [ + 5, + 4 + ] + } + ] + }, + "legacy_answer": "S1 0 V2 [5,6]\nS3 0 V3 [5,5]\nS4 90 V3 [4,6]\nS6 180 V3 [5,4]", + "solutionText": "S1 0 V2 [5,6]\nS3 0 V3 [5,5]\nS4 90 V3 [4,6]\nS6 180 V3 [5,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-369\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S5: V1=[0,0], V2=[1,0], V3=[0,1]\n- S6: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-370.json b/voi/data/voi-370.json new file mode 100644 index 0000000000000000000000000000000000000000..509327189f04ad324e1c13f87935b2c879d8b5fe --- /dev/null +++ b/voi/data/voi-370.json @@ -0,0 +1,269 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 3 + ], + [ + 2, + 3 + ], + [ + 2, + 1 + ], + [ + 5, + 1 + ] + ] + }, + { + "polygon": [ + [ + 0, + 2 + ], + [ + 2, + 2 + ], + [ + 0, + 4 + ] + ] + }, + { + "polygon": [ + [ + 1, + 2 + ], + [ + 1, + 1 + ], + [ + 3, + 1 + ], + [ + 3, + 2 + ] + ] + }, + { + "polygon": [ + [ + 6, + 3 + ], + [ + 6, + 4 + ], + [ + 4, + 4 + ], + [ + 4, + 3 + ] + ] + } + ], + "meta": { + "seed": 4205071, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.165803, + "contourComplexity": 78, + "connectedComponents": 1, + "fillRatio": 0.157227, + "difficultyScore": 0.722334, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 371, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-370/target.png", + "shapes": { + "S1": "../images/voi-370/shape_S1.png", + "S2": "../images/voi-370/shape_S2.png", + "S3": "../images/voi-370/shape_S3.png", + "S4": "../images/voi-370/shape_S4.png", + "S5": "../images/voi-370/shape_S5.png", + "S6": "../images/voi-370/shape_S6.png" + } + }, + "ID": "voi-370", + "answer": { + "placements": [ + { + "shape": "S3", + "angle": 180, + "vertex": "V4", + "grid": [ + 5, + 1 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V1", + "grid": [ + 0, + 2 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V1", + "grid": [ + 1, + 2 + ] + }, + { + "shape": "S6", + "angle": 270, + "vertex": "V4", + "grid": [ + 4, + 3 + ] + } + ] + }, + "legacy_answer": "S3 180 V4 [5,1]\nS4 0 V1 [0,2]\nS5 90 V1 [1,2]\nS6 270 V4 [4,3]", + "solutionText": "S3 180 V4 [5,1]\nS4 0 V1 [0,2]\nS5 90 V1 [1,2]\nS6 270 V4 [4,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-370\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n- S5: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S6: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-371.json b/voi/data/voi-371.json new file mode 100644 index 0000000000000000000000000000000000000000..a0ff8fe2aa483bfec96f7dcb604c4e1ebd26182c --- /dev/null +++ b/voi/data/voi-371.json @@ -0,0 +1,285 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 4 + ], + [ + 0, + 4 + ], + [ + 0, + 2 + ], + [ + 3, + 2 + ] + ] + }, + { + "polygon": [ + [ + 1, + 3 + ], + [ + 1, + 6 + ], + [ + 0, + 6 + ], + [ + 0, + 3 + ] + ] + }, + { + "polygon": [ + [ + 3, + 8 + ], + [ + 1, + 8 + ], + [ + 1, + 7 + ], + [ + 2, + 7 + ], + [ + 2, + 5 + ], + [ + 3, + 5 + ] + ] + }, + { + "polygon": [ + [ + 3, + 4 + ], + [ + 3, + 7 + ], + [ + 1, + 7 + ], + [ + 1, + 4 + ] + ] + } + ], + "meta": { + "seed": 4205072, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.315789, + "contourComplexity": 14, + "connectedComponents": 1, + "fillRatio": 0.203125, + "difficultyScore": 0.356908, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 372, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-371/target.png", + "shapes": { + "S1": "../images/voi-371/shape_S1.png", + "S2": "../images/voi-371/shape_S2.png", + "S3": "../images/voi-371/shape_S3.png", + "S4": "../images/voi-371/shape_S4.png", + "S5": "../images/voi-371/shape_S5.png", + "S6": "../images/voi-371/shape_S6.png" + } + }, + "ID": "voi-371", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V1", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V3", + "grid": [ + 0, + 6 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V3", + "grid": [ + 1, + 7 + ] + }, + { + "shape": "S5", + "angle": 270, + "vertex": "V4", + "grid": [ + 1, + 4 + ] + } + ] + }, + "legacy_answer": "S1 180 V1 [3,4]\nS2 270 V3 [0,6]\nS4 180 V3 [1,7]\nS5 270 V4 [1,4]", + "solutionText": "S1 180 V1 [3,4]\nS2 270 V3 [0,6]\nS4 180 V3 [1,7]\nS5 270 V4 [1,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-371\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S6: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-372.json b/voi/data/voi-372.json new file mode 100644 index 0000000000000000000000000000000000000000..84ce285a38ba30b3409d91699ee2a1de19183466 --- /dev/null +++ b/voi/data/voi-372.json @@ -0,0 +1,293 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 5 + ], + [ + 6, + 5 + ], + [ + 6, + 7 + ], + [ + 5, + 7 + ] + ] + }, + { + "polygon": [ + [ + 4, + 5 + ], + [ + 7, + 5 + ], + [ + 7, + 6 + ], + [ + 4, + 6 + ] + ] + }, + { + "polygon": [ + [ + 1, + 7 + ], + [ + 1, + 5 + ], + [ + 2, + 5 + ], + [ + 2, + 6 + ], + [ + 4, + 6 + ], + [ + 4, + 7 + ] + ] + }, + { + "polygon": [ + [ + 6, + 7 + ], + [ + 4, + 7 + ], + [ + 6, + 5 + ] + ] + } + ], + "meta": { + "seed": 4205073, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.361582, + "contourComplexity": 75, + "connectedComponents": 1, + "fillRatio": 0.110352, + "difficultyScore": 0.725625, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 373, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-372/target.png", + "shapes": { + "S1": "../images/voi-372/shape_S1.png", + "S2": "../images/voi-372/shape_S2.png", + "S3": "../images/voi-372/shape_S3.png", + "S4": "../images/voi-372/shape_S4.png", + "S5": "../images/voi-372/shape_S5.png", + "S6": "../images/voi-372/shape_S6.png" + } + }, + "ID": "voi-372", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V1", + "grid": [ + 5, + 5 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V2", + "grid": [ + 7, + 5 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V2", + "grid": [ + 1, + 5 + ] + }, + { + "shape": "S6", + "angle": 180, + "vertex": "V1", + "grid": [ + 6, + 7 + ] + } + ] + }, + "legacy_answer": "S1 0 V1 [5,5]\nS3 0 V2 [7,5]\nS5 90 V2 [1,5]\nS6 180 V1 [6,7]", + "solutionText": "S1 0 V1 [5,5]\nS3 0 V2 [7,5]\nS5 90 V2 [1,5]\nS6 180 V1 [6,7]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-372\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S6: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-373.json b/voi/data/voi-373.json new file mode 100644 index 0000000000000000000000000000000000000000..735223b39bf47485f37d221a8d5131a4a9be47dd --- /dev/null +++ b/voi/data/voi-373.json @@ -0,0 +1,269 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 1, + 0 + ], + [ + 4, + 0 + ], + [ + 3, + 1 + ], + [ + 1, + 1 + ] + ] + }, + { + "polygon": [ + [ + 1, + 4 + ], + [ + 1, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 4 + ] + ] + }, + { + "polygon": [ + [ + 4, + 0 + ], + [ + 5, + 0 + ], + [ + 5, + 3 + ], + [ + 4, + 3 + ] + ] + }, + { + "polygon": [ + [ + 3, + 4 + ], + [ + 3, + 1 + ], + [ + 5, + 1 + ], + [ + 5, + 4 + ] + ] + } + ], + "meta": { + "seed": 4205074, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.295612, + "contourComplexity": 44, + "connectedComponents": 1, + "fillRatio": 0.148926, + "difficultyScore": 0.384596, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 374, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-373/target.png", + "shapes": { + "S1": "../images/voi-373/shape_S1.png", + "S2": "../images/voi-373/shape_S2.png", + "S3": "../images/voi-373/shape_S3.png", + "S4": "../images/voi-373/shape_S4.png", + "S5": "../images/voi-373/shape_S5.png", + "S6": "../images/voi-373/shape_S6.png" + } + }, + "ID": "voi-373", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V2", + "grid": [ + 4, + 0 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V1", + "grid": [ + 1, + 4 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V1", + "grid": [ + 4, + 0 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V3", + "grid": [ + 5, + 1 + ] + } + ] + }, + "legacy_answer": "S1 0 V2 [4,0]\nS2 90 V1 [1,4]\nS3 0 V1 [4,0]\nS5 90 V3 [5,1]", + "solutionText": "S1 0 V2 [4,0]\nS2 90 V1 [1,4]\nS3 0 V1 [4,0]\nS5 90 V3 [5,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-373\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S6: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-374.json b/voi/data/voi-374.json new file mode 100644 index 0000000000000000000000000000000000000000..6635e813ef2d93719c5cd27f5bcf9711e9bc623d --- /dev/null +++ b/voi/data/voi-374.json @@ -0,0 +1,285 @@ +{ + "gridSize": 8, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 1, + 3 + ], + [ + 1, + 0 + ], + [ + 3, + 0 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 6, + 2 + ], + [ + 6, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 2 + ] + ] + }, + { + "polygon": [ + [ + 7, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 3 + ], + [ + 7, + 3 + ] + ] + }, + { + "polygon": [ + [ + 6, + 3 + ], + [ + 6, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 3 + ] + ] + } + ], + "meta": { + "seed": 4205075, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.210526, + "contourComplexity": 17, + "connectedComponents": 1, + "fillRatio": 0.234375, + "difficultyScore": 0.389145, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 375, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-374/target.png", + "shapes": { + "S1": "../images/voi-374/shape_S1.png", + "S2": "../images/voi-374/shape_S2.png", + "S3": "../images/voi-374/shape_S3.png", + "S4": "../images/voi-374/shape_S4.png", + "S5": "../images/voi-374/shape_S5.png", + "S6": "../images/voi-374/shape_S6.png" + } + }, + "ID": "voi-374", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V2", + "grid": [ + 1, + 0 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V4", + "grid": [ + 5, + 3 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V2", + "grid": [ + 4, + 5 + ] + }, + { + "shape": "S6", + "angle": 270, + "vertex": "V2", + "grid": [ + 6, + 4 + ] + } + ] + }, + "legacy_answer": "S1 90 V2 [1,0]\nS2 270 V4 [5,3]\nS3 180 V2 [4,5]\nS6 270 V2 [6,4]", + "solutionText": "S1 90 V2 [1,0]\nS2 270 V4 [5,3]\nS3 180 V2 [4,5]\nS6 270 V2 [6,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-374\n- grid_size: 8x8\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S5: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S6: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-375.json b/voi/data/voi-375.json new file mode 100644 index 0000000000000000000000000000000000000000..b3f039f65d1869b50fbee74cb4aa72d8e3713309 --- /dev/null +++ b/voi/data/voi-375.json @@ -0,0 +1,269 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 4 + ], + [ + 6, + 4 + ], + [ + 6, + 6 + ], + [ + 3, + 6 + ] + ] + }, + { + "polygon": [ + [ + 3, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 5 + ], + [ + 3, + 5 + ] + ] + }, + { + "polygon": [ + [ + 3, + 0 + ], + [ + 5, + 0 + ], + [ + 5, + 2 + ], + [ + 3, + 2 + ] + ] + }, + { + "polygon": [ + [ + 6, + 2 + ], + [ + 6, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 2 + ] + ] + } + ], + "meta": { + "seed": 4206001, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.333333, + "contourComplexity": 14, + "connectedComponents": 1, + "fillRatio": 0.12, + "difficultyScore": 0.493333, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 376, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-375/target.png", + "shapes": { + "S1": "../images/voi-375/shape_S1.png", + "S2": "../images/voi-375/shape_S2.png", + "S3": "../images/voi-375/shape_S3.png", + "S4": "../images/voi-375/shape_S4.png", + "S5": "../images/voi-375/shape_S5.png", + "S6": "../images/voi-375/shape_S6.png" + } + }, + "ID": "voi-375", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V2", + "grid": [ + 6, + 4 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V4", + "grid": [ + 3, + 5 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V3", + "grid": [ + 5, + 2 + ] + }, + { + "shape": "S6", + "angle": 270, + "vertex": "V3", + "grid": [ + 4, + 5 + ] + } + ] + }, + "legacy_answer": "S1 0 V2 [6,4]\nS2 0 V4 [3,5]\nS5 0 V3 [5,2]\nS6 270 V3 [4,5]", + "solutionText": "S1 0 V2 [6,4]\nS2 0 V4 [3,5]\nS5 0 V3 [5,2]\nS6 270 V3 [4,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-375\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S5: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S6: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-376.json b/voi/data/voi-376.json new file mode 100644 index 0000000000000000000000000000000000000000..4652c315bf62ac2b5e7f60eb748bc0c4db279f87 --- /dev/null +++ b/voi/data/voi-376.json @@ -0,0 +1,301 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 0, + 7 + ], + [ + 0, + 5 + ], + [ + 1, + 5 + ], + [ + 1, + 6 + ], + [ + 3, + 6 + ], + [ + 3, + 7 + ] + ] + }, + { + "polygon": [ + [ + 8, + 3 + ], + [ + 10, + 3 + ], + [ + 10, + 4 + ], + [ + 9, + 4 + ], + [ + 9, + 6 + ], + [ + 8, + 6 + ] + ] + }, + { + "polygon": [ + [ + 10, + 3 + ], + [ + 10, + 4 + ], + [ + 7, + 4 + ], + [ + 7, + 3 + ] + ] + }, + { + "polygon": [ + [ + 8, + 4 + ], + [ + 8, + 2 + ], + [ + 10, + 2 + ], + [ + 10, + 4 + ] + ] + } + ], + "meta": { + "seed": 4206002, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.266667, + "contourComplexity": 16, + "connectedComponents": 2, + "fillRatio": 0.11, + "difficultyScore": 0.763333, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 377, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-376/target.png", + "shapes": { + "S1": "../images/voi-376/shape_S1.png", + "S2": "../images/voi-376/shape_S2.png", + "S3": "../images/voi-376/shape_S3.png", + "S4": "../images/voi-376/shape_S4.png", + "S5": "../images/voi-376/shape_S5.png", + "S6": "../images/voi-376/shape_S6.png" + } + }, + "ID": "voi-376", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 90, + "vertex": "V5", + "grid": [ + 3, + 6 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V2", + "grid": [ + 10, + 3 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V3", + "grid": [ + 7, + 4 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V4", + "grid": [ + 10, + 4 + ] + } + ] + }, + "legacy_answer": "S2 90 V5 [3,6]\nS3 0 V2 [10,3]\nS4 270 V3 [7,4]\nS5 90 V4 [10,4]", + "solutionText": "S2 90 V5 [3,6]\nS3 0 V2 [10,3]\nS4 270 V3 [7,4]\nS5 90 V4 [10,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-376\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S5: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S6: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-377.json b/voi/data/voi-377.json new file mode 100644 index 0000000000000000000000000000000000000000..aaa24fe4739ffa26ff528bd4cd9a7d54528337f6 --- /dev/null +++ b/voi/data/voi-377.json @@ -0,0 +1,265 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 5 + ], + [ + 2, + 7 + ], + [ + 0, + 7 + ], + [ + 0, + 5 + ] + ] + }, + { + "polygon": [ + [ + 0, + 6 + ], + [ + 3, + 6 + ], + [ + 2, + 7 + ], + [ + 0, + 7 + ] + ] + }, + { + "polygon": [ + [ + 3, + 2 + ], + [ + 5, + 2 + ], + [ + 5, + 4 + ], + [ + 3, + 4 + ] + ] + }, + { + "polygon": [ + [ + 3, + 7 + ], + [ + 3, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 7 + ] + ] + } + ], + "meta": { + "seed": 4206003, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.241966, + "contourComplexity": 42, + "connectedComponents": 2, + "fillRatio": 0.125312, + "difficultyScore": 0.831511, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 378, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-377/target.png", + "shapes": { + "S1": "../images/voi-377/shape_S1.png", + "S2": "../images/voi-377/shape_S2.png", + "S3": "../images/voi-377/shape_S3.png", + "S4": "../images/voi-377/shape_S4.png", + "S5": "../images/voi-377/shape_S5.png", + "S6": "../images/voi-377/shape_S6.png" + } + }, + "ID": "voi-377", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V1", + "grid": [ + 2, + 5 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V4", + "grid": [ + 0, + 7 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V2", + "grid": [ + 5, + 2 + ] + }, + { + "shape": "S6", + "angle": 90, + "vertex": "V1", + "grid": [ + 3, + 7 + ] + } + ] + }, + "legacy_answer": "S1 270 V1 [2,5]\nS2 0 V4 [0,7]\nS5 0 V2 [5,2]\nS6 90 V1 [3,7]", + "solutionText": "S1 270 V1 [2,5]\nS2 0 V4 [0,7]\nS5 0 V2 [5,2]\nS6 90 V1 [3,7]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-377\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[1,0], V3=[0,1]\n- S4: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S5: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S6: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-378.json b/voi/data/voi-378.json new file mode 100644 index 0000000000000000000000000000000000000000..f769f8bdf2e2c91d76244b384eac8fe72a33c455 --- /dev/null +++ b/voi/data/voi-378.json @@ -0,0 +1,261 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 7, + 0 + ], + [ + 9, + 0 + ], + [ + 7, + 2 + ] + ] + }, + { + "polygon": [ + [ + 7, + 2 + ], + [ + 9, + 2 + ], + [ + 9, + 3 + ], + [ + 7, + 3 + ] + ] + }, + { + "polygon": [ + [ + 4, + 2 + ], + [ + 7, + 2 + ], + [ + 7, + 4 + ], + [ + 4, + 4 + ] + ] + }, + { + "polygon": [ + [ + 7, + 5 + ], + [ + 5, + 5 + ], + [ + 5, + 3 + ], + [ + 7, + 3 + ] + ] + } + ], + "meta": { + "seed": 4206004, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.284444, + "contourComplexity": 76, + "connectedComponents": 2, + "fillRatio": 0.100625, + "difficultyScore": 0.710972, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 379, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-378/target.png", + "shapes": { + "S1": "../images/voi-378/shape_S1.png", + "S2": "../images/voi-378/shape_S2.png", + "S3": "../images/voi-378/shape_S3.png", + "S4": "../images/voi-378/shape_S4.png", + "S5": "../images/voi-378/shape_S5.png", + "S6": "../images/voi-378/shape_S6.png" + } + }, + "ID": "voi-378", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 0, + "vertex": "V2", + "grid": [ + 9, + 0 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V1", + "grid": [ + 7, + 2 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V1", + "grid": [ + 4, + 2 + ] + }, + { + "shape": "S5", + "angle": 180, + "vertex": "V1", + "grid": [ + 7, + 5 + ] + } + ] + }, + "legacy_answer": "S2 0 V2 [9,0]\nS3 0 V1 [7,2]\nS4 0 V1 [4,2]\nS5 180 V1 [7,5]", + "solutionText": "S2 0 V2 [9,0]\nS3 0 V1 [7,2]\nS4 0 V1 [4,2]\nS5 180 V1 [7,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-378\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S6: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-379.json b/voi/data/voi-379.json new file mode 100644 index 0000000000000000000000000000000000000000..e79cf02d36533f6f8b111d36a443318bb9d0b6a6 --- /dev/null +++ b/voi/data/voi-379.json @@ -0,0 +1,257 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 5 + ], + [ + 4, + 4 + ], + [ + 6, + 4 + ], + [ + 6, + 5 + ] + ] + }, + { + "polygon": [ + [ + 7, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 3 + ], + [ + 7, + 3 + ] + ] + }, + { + "polygon": [ + [ + 6, + 8 + ], + [ + 7, + 8 + ], + [ + 6, + 9 + ] + ] + }, + { + "polygon": [ + [ + 7, + 6 + ], + [ + 7, + 3 + ], + [ + 9, + 3 + ], + [ + 9, + 6 + ] + ] + } + ], + "meta": { + "seed": 4206005, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.275269, + "contourComplexity": 42, + "connectedComponents": 2, + "fillRatio": 0.105313, + "difficultyScore": 0.7383, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 380, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-379/target.png", + "shapes": { + "S1": "../images/voi-379/shape_S1.png", + "S2": "../images/voi-379/shape_S2.png", + "S3": "../images/voi-379/shape_S3.png", + "S4": "../images/voi-379/shape_S4.png", + "S5": "../images/voi-379/shape_S5.png", + "S6": "../images/voi-379/shape_S6.png" + } + }, + "ID": "voi-379", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 90, + "vertex": "V2", + "grid": [ + 4, + 4 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V3", + "grid": [ + 4, + 3 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V1", + "grid": [ + 6, + 8 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V1", + "grid": [ + 7, + 6 + ] + } + ] + }, + "legacy_answer": "S2 90 V2 [4,4]\nS3 180 V3 [4,3]\nS4 0 V1 [6,8]\nS5 90 V1 [7,6]", + "solutionText": "S2 90 V2 [4,4]\nS3 180 V3 [4,3]\nS4 0 V1 [6,8]\nS5 90 V1 [7,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-379\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[0,1]\n- S2: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[0,1]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S6: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-380.json b/voi/data/voi-380.json new file mode 100644 index 0000000000000000000000000000000000000000..d1b3c62497dca04af749e44a1dbe4274ff3e056b --- /dev/null +++ b/voi/data/voi-380.json @@ -0,0 +1,261 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 7, + 7 + ], + [ + 7, + 9 + ], + [ + 5, + 9 + ], + [ + 5, + 7 + ] + ] + }, + { + "polygon": [ + [ + 5, + 4 + ], + [ + 7, + 4 + ], + [ + 7, + 6 + ], + [ + 5, + 6 + ] + ] + }, + { + "polygon": [ + [ + 3, + 7 + ], + [ + 3, + 5 + ], + [ + 5, + 7 + ] + ] + }, + { + "polygon": [ + [ + 7, + 8 + ], + [ + 5, + 8 + ], + [ + 5, + 6 + ], + [ + 7, + 6 + ] + ] + } + ], + "meta": { + "seed": 4206006, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.284444, + "contourComplexity": 72, + "connectedComponents": 2, + "fillRatio": 0.100625, + "difficultyScore": 0.710972, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 381, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-380/target.png", + "shapes": { + "S1": "../images/voi-380/shape_S1.png", + "S2": "../images/voi-380/shape_S2.png", + "S3": "../images/voi-380/shape_S3.png", + "S4": "../images/voi-380/shape_S4.png", + "S5": "../images/voi-380/shape_S5.png", + "S6": "../images/voi-380/shape_S6.png" + } + }, + "ID": "voi-380", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V4", + "grid": [ + 5, + 7 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V3", + "grid": [ + 7, + 6 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V1", + "grid": [ + 3, + 7 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V3", + "grid": [ + 5, + 6 + ] + } + ] + }, + "legacy_answer": "S1 270 V4 [5,7]\nS2 0 V3 [7,6]\nS3 90 V1 [3,7]\nS4 180 V3 [5,6]", + "solutionText": "S1 270 V4 [5,7]\nS2 0 V3 [7,6]\nS3 90 V1 [3,7]\nS4 180 V3 [5,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-380\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S6: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-381.json b/voi/data/voi-381.json new file mode 100644 index 0000000000000000000000000000000000000000..d138b9e5b0dac333f857bb869f86f936b30f1394 --- /dev/null +++ b/voi/data/voi-381.json @@ -0,0 +1,301 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 7 + ], + [ + 4, + 5 + ], + [ + 5, + 5 + ], + [ + 5, + 6 + ], + [ + 7, + 6 + ], + [ + 7, + 7 + ] + ] + }, + { + "polygon": [ + [ + 6, + 2 + ], + [ + 6, + 0 + ], + [ + 8, + 0 + ], + [ + 8, + 2 + ] + ] + }, + { + "polygon": [ + [ + 8, + 3 + ], + [ + 6, + 3 + ], + [ + 6, + 2 + ], + [ + 7, + 2 + ], + [ + 7, + 0 + ], + [ + 8, + 0 + ] + ] + }, + { + "polygon": [ + [ + 3, + 6 + ], + [ + 3, + 3 + ], + [ + 4, + 4 + ], + [ + 4, + 6 + ] + ] + } + ], + "meta": { + "seed": 4206007, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.275269, + "contourComplexity": 46, + "connectedComponents": 2, + "fillRatio": 0.105313, + "difficultyScore": 0.7383, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 382, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-381/target.png", + "shapes": { + "S1": "../images/voi-381/shape_S1.png", + "S2": "../images/voi-381/shape_S2.png", + "S3": "../images/voi-381/shape_S3.png", + "S4": "../images/voi-381/shape_S4.png", + "S5": "../images/voi-381/shape_S5.png", + "S6": "../images/voi-381/shape_S6.png" + } + }, + "ID": "voi-381", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V3", + "grid": [ + 5, + 5 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V2", + "grid": [ + 6, + 0 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V1", + "grid": [ + 8, + 3 + ] + }, + { + "shape": "S6", + "angle": 90, + "vertex": "V3", + "grid": [ + 4, + 4 + ] + } + ] + }, + "legacy_answer": "S1 90 V3 [5,5]\nS2 90 V2 [6,0]\nS4 180 V1 [8,3]\nS6 90 V3 [4,4]", + "solutionText": "S1 90 V3 [5,5]\nS2 90 V2 [6,0]\nS4 180 V1 [8,3]\nS6 90 V3 [4,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-381\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S6: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-382.json b/voi/data/voi-382.json new file mode 100644 index 0000000000000000000000000000000000000000..47031e68f514da2e354d5b72628fbbbcc530e386 --- /dev/null +++ b/voi/data/voi-382.json @@ -0,0 +1,293 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 6 + ], + [ + 6, + 8 + ], + [ + 5, + 8 + ], + [ + 5, + 7 + ], + [ + 3, + 7 + ], + [ + 3, + 6 + ] + ] + }, + { + "polygon": [ + [ + 6, + 9 + ], + [ + 6, + 6 + ], + [ + 8, + 6 + ], + [ + 8, + 9 + ] + ] + }, + { + "polygon": [ + [ + 7, + 4 + ], + [ + 7, + 6 + ], + [ + 6, + 6 + ], + [ + 6, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 4 + ] + ] + }, + { + "polygon": [ + [ + 7, + 8 + ], + [ + 5, + 8 + ], + [ + 7, + 6 + ] + ] + } + ], + "meta": { + "seed": 4206008, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.256809, + "contourComplexity": 78, + "connectedComponents": 2, + "fillRatio": 0.119375, + "difficultyScore": 0.784013, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 383, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-382/target.png", + "shapes": { + "S1": "../images/voi-382/shape_S1.png", + "S2": "../images/voi-382/shape_S2.png", + "S3": "../images/voi-382/shape_S3.png", + "S4": "../images/voi-382/shape_S4.png", + "S5": "../images/voi-382/shape_S5.png", + "S6": "../images/voi-382/shape_S6.png" + } + }, + "ID": "voi-382", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 270, + "vertex": "V2", + "grid": [ + 6, + 8 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V4", + "grid": [ + 8, + 9 + ] + }, + { + "shape": "S5", + "angle": 270, + "vertex": "V2", + "grid": [ + 7, + 6 + ] + }, + { + "shape": "S6", + "angle": 180, + "vertex": "V2", + "grid": [ + 5, + 8 + ] + } + ] + }, + "legacy_answer": "S2 270 V2 [6,8]\nS4 90 V4 [8,9]\nS5 270 V2 [7,6]\nS6 180 V2 [5,8]", + "solutionText": "S2 270 V2 [6,8]\nS4 90 V4 [8,9]\nS5 270 V2 [7,6]\nS6 180 V2 [5,8]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-382\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S6: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-383.json b/voi/data/voi-383.json new file mode 100644 index 0000000000000000000000000000000000000000..c86d46fa59ce324fdc7a11e587bf8595b384adb1 --- /dev/null +++ b/voi/data/voi-383.json @@ -0,0 +1,301 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 0, + 5 + ], + [ + 0, + 3 + ], + [ + 1, + 3 + ], + [ + 1, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 5 + ] + ] + }, + { + "polygon": [ + [ + 2, + 3 + ], + [ + 2, + 0 + ], + [ + 4, + 0 + ], + [ + 4, + 3 + ] + ] + }, + { + "polygon": [ + [ + 3, + 3 + ], + [ + 6, + 3 + ], + [ + 6, + 5 + ], + [ + 3, + 5 + ] + ] + }, + { + "polygon": [ + [ + 7, + 3 + ], + [ + 7, + 5 + ], + [ + 6, + 5 + ], + [ + 6, + 4 + ], + [ + 4, + 4 + ], + [ + 4, + 3 + ] + ] + } + ], + "meta": { + "seed": 4206009, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.2, + "contourComplexity": 14, + "connectedComponents": 1, + "fillRatio": 0.16, + "difficultyScore": 0.68, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 384, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-383/target.png", + "shapes": { + "S1": "../images/voi-383/shape_S1.png", + "S2": "../images/voi-383/shape_S2.png", + "S3": "../images/voi-383/shape_S3.png", + "S4": "../images/voi-383/shape_S4.png", + "S5": "../images/voi-383/shape_S5.png", + "S6": "../images/voi-383/shape_S6.png" + } + }, + "ID": "voi-383", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 90, + "vertex": "V5", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V2", + "grid": [ + 2, + 0 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V2", + "grid": [ + 6, + 3 + ] + }, + { + "shape": "S6", + "angle": 270, + "vertex": "V6", + "grid": [ + 4, + 3 + ] + } + ] + }, + "legacy_answer": "S2 90 V5 [3,4]\nS4 90 V2 [2,0]\nS5 0 V2 [6,3]\nS6 270 V6 [4,3]", + "solutionText": "S2 90 V5 [3,4]\nS4 90 V2 [2,0]\nS5 0 V2 [6,3]\nS6 270 V6 [4,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-383\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S6: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-384.json b/voi/data/voi-384.json new file mode 100644 index 0000000000000000000000000000000000000000..63fd2ff1967a46766d30dd6a3155a80896d12b68 --- /dev/null +++ b/voi/data/voi-384.json @@ -0,0 +1,285 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 3 + ], + [ + 2, + 0 + ], + [ + 3, + 0 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 6, + 0 + ], + [ + 6, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 0 + ] + ] + }, + { + "polygon": [ + [ + 5, + 1 + ], + [ + 6, + 1 + ], + [ + 6, + 4 + ], + [ + 5, + 4 + ] + ] + }, + { + "polygon": [ + [ + 4, + 5 + ], + [ + 4, + 3 + ], + [ + 5, + 3 + ], + [ + 5, + 4 + ], + [ + 7, + 4 + ], + [ + 7, + 5 + ] + ] + } + ], + "meta": { + "seed": 4206010, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.25, + "contourComplexity": 14, + "connectedComponents": 2, + "fillRatio": 0.12, + "difficultyScore": 0.81, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 385, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-384/target.png", + "shapes": { + "S1": "../images/voi-384/shape_S1.png", + "S2": "../images/voi-384/shape_S2.png", + "S3": "../images/voi-384/shape_S3.png", + "S4": "../images/voi-384/shape_S4.png", + "S5": "../images/voi-384/shape_S5.png", + "S6": "../images/voi-384/shape_S6.png" + } + }, + "ID": "voi-384", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V3", + "grid": [ + 3, + 0 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V2", + "grid": [ + 6, + 3 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V2", + "grid": [ + 6, + 1 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V3", + "grid": [ + 5, + 3 + ] + } + ] + }, + "legacy_answer": "S1 90 V3 [3,0]\nS2 270 V2 [6,3]\nS4 0 V2 [6,1]\nS5 90 V3 [5,3]", + "solutionText": "S1 90 V3 [3,0]\nS2 270 V2 [6,3]\nS4 0 V2 [6,1]\nS5 90 V3 [5,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-384\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S6: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-385.json b/voi/data/voi-385.json new file mode 100644 index 0000000000000000000000000000000000000000..31cfb1eff6774435dde5aa196b1c7aaf6b88a770 --- /dev/null +++ b/voi/data/voi-385.json @@ -0,0 +1,261 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 9, + 6 + ], + [ + 9, + 8 + ], + [ + 7, + 6 + ] + ] + }, + { + "polygon": [ + [ + 4, + 2 + ], + [ + 7, + 2 + ], + [ + 6, + 3 + ], + [ + 4, + 3 + ] + ] + }, + { + "polygon": [ + [ + 8, + 10 + ], + [ + 8, + 8 + ], + [ + 10, + 8 + ], + [ + 10, + 10 + ] + ] + }, + { + "polygon": [ + [ + 7, + 6 + ], + [ + 10, + 6 + ], + [ + 10, + 8 + ], + [ + 7, + 8 + ] + ] + } + ], + "meta": { + "seed": 4206011, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.282655, + "contourComplexity": 104, + "connectedComponents": 2, + "fillRatio": 0.104688, + "difficultyScore": 0.710004, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 386, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-385/target.png", + "shapes": { + "S1": "../images/voi-385/shape_S1.png", + "S2": "../images/voi-385/shape_S2.png", + "S3": "../images/voi-385/shape_S3.png", + "S4": "../images/voi-385/shape_S4.png", + "S5": "../images/voi-385/shape_S5.png", + "S6": "../images/voi-385/shape_S6.png" + } + }, + "ID": "voi-385", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 270, + "vertex": "V1", + "grid": [ + 9, + 6 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V4", + "grid": [ + 4, + 3 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V1", + "grid": [ + 8, + 10 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V4", + "grid": [ + 7, + 8 + ] + } + ] + }, + "legacy_answer": "S2 270 V1 [9,6]\nS3 0 V4 [4,3]\nS4 90 V1 [8,10]\nS5 0 V4 [7,8]", + "solutionText": "S2 270 V1 [9,6]\nS3 0 V4 [4,3]\nS4 90 V1 [8,10]\nS5 0 V4 [7,8]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-385\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S6: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-386.json b/voi/data/voi-386.json new file mode 100644 index 0000000000000000000000000000000000000000..1c92368ca0a47d10dba42ca4f26e0885ae8044c1 --- /dev/null +++ b/voi/data/voi-386.json @@ -0,0 +1,277 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 1 + ], + [ + 4, + 1 + ], + [ + 2, + 3 + ] + ] + }, + { + "polygon": [ + [ + 3, + 6 + ], + [ + 3, + 4 + ], + [ + 4, + 4 + ], + [ + 4, + 5 + ], + [ + 6, + 5 + ], + [ + 6, + 6 + ] + ] + }, + { + "polygon": [ + [ + 5, + 2 + ], + [ + 5, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 2 + ] + ] + }, + { + "polygon": [ + [ + 4, + 4 + ], + [ + 6, + 4 + ], + [ + 6, + 6 + ], + [ + 4, + 6 + ] + ] + } + ], + "meta": { + "seed": 4206012, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.284444, + "contourComplexity": 72, + "connectedComponents": 1, + "fillRatio": 0.100625, + "difficultyScore": 0.460972, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 387, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-386/target.png", + "shapes": { + "S1": "../images/voi-386/shape_S1.png", + "S2": "../images/voi-386/shape_S2.png", + "S3": "../images/voi-386/shape_S3.png", + "S4": "../images/voi-386/shape_S4.png", + "S5": "../images/voi-386/shape_S5.png", + "S6": "../images/voi-386/shape_S6.png" + } + }, + "ID": "voi-386", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V2", + "grid": [ + 4, + 1 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V1", + "grid": [ + 3, + 6 + ] + }, + { + "shape": "S5", + "angle": 270, + "vertex": "V2", + "grid": [ + 5, + 4 + ] + }, + { + "shape": "S6", + "angle": 0, + "vertex": "V2", + "grid": [ + 6, + 4 + ] + } + ] + }, + "legacy_answer": "S1 0 V2 [4,1]\nS4 90 V1 [3,6]\nS5 270 V2 [5,4]\nS6 0 V2 [6,4]", + "solutionText": "S1 0 V2 [4,1]\nS4 90 V1 [3,6]\nS5 270 V2 [5,4]\nS6 0 V2 [6,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-386\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S5: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S6: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-387.json b/voi/data/voi-387.json new file mode 100644 index 0000000000000000000000000000000000000000..8bd47f8967a9b15f623f7a6f651022736dce63c9 --- /dev/null +++ b/voi/data/voi-387.json @@ -0,0 +1,285 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 2 + ], + [ + 4, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 2 + ] + ] + }, + { + "polygon": [ + [ + 4, + 4 + ], + [ + 6, + 4 + ], + [ + 4, + 6 + ] + ] + }, + { + "polygon": [ + [ + 6, + 5 + ], + [ + 6, + 8 + ], + [ + 4, + 8 + ], + [ + 4, + 5 + ] + ] + }, + { + "polygon": [ + [ + 3, + 6 + ], + [ + 5, + 6 + ], + [ + 5, + 7 + ], + [ + 4, + 7 + ], + [ + 4, + 9 + ], + [ + 3, + 9 + ] + ] + } + ], + "meta": { + "seed": 4206013, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.20332, + "contourComplexity": 78, + "connectedComponents": 1, + "fillRatio": 0.12, + "difficultyScore": 0.746722, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 388, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-387/target.png", + "shapes": { + "S1": "../images/voi-387/shape_S1.png", + "S2": "../images/voi-387/shape_S2.png", + "S3": "../images/voi-387/shape_S3.png", + "S4": "../images/voi-387/shape_S4.png", + "S5": "../images/voi-387/shape_S5.png", + "S6": "../images/voi-387/shape_S6.png" + } + }, + "ID": "voi-387", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V3", + "grid": [ + 3, + 5 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V2", + "grid": [ + 6, + 4 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V2", + "grid": [ + 6, + 8 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V1", + "grid": [ + 3, + 6 + ] + } + ] + }, + "legacy_answer": "S1 270 V3 [3,5]\nS3 0 V2 [6,4]\nS4 270 V2 [6,8]\nS5 0 V1 [3,6]", + "solutionText": "S1 270 V3 [3,5]\nS3 0 V2 [6,4]\nS4 270 V2 [6,8]\nS5 0 V1 [3,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-387\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S2: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S6: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-388.json b/voi/data/voi-388.json new file mode 100644 index 0000000000000000000000000000000000000000..3aff6e13809372b6d61e5f33685037986aca37d0 --- /dev/null +++ b/voi/data/voi-388.json @@ -0,0 +1,285 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 5 + ], + [ + 6, + 5 + ], + [ + 6, + 6 + ], + [ + 5, + 6 + ] + ] + }, + { + "polygon": [ + [ + 5, + 4 + ], + [ + 2, + 4 + ], + [ + 2, + 2 + ], + [ + 5, + 2 + ] + ] + }, + { + "polygon": [ + [ + 2, + 1 + ], + [ + 4, + 1 + ], + [ + 4, + 2 + ], + [ + 3, + 2 + ], + [ + 3, + 4 + ], + [ + 2, + 4 + ] + ] + }, + { + "polygon": [ + [ + 7, + 1 + ], + [ + 7, + 4 + ], + [ + 5, + 4 + ], + [ + 5, + 1 + ] + ] + } + ], + "meta": { + "seed": 4206014, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.235294, + "contourComplexity": 14, + "connectedComponents": 2, + "fillRatio": 0.13, + "difficultyScore": 0.848824, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 389, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-388/target.png", + "shapes": { + "S1": "../images/voi-388/shape_S1.png", + "S2": "../images/voi-388/shape_S2.png", + "S3": "../images/voi-388/shape_S3.png", + "S4": "../images/voi-388/shape_S4.png", + "S5": "../images/voi-388/shape_S5.png", + "S6": "../images/voi-388/shape_S6.png" + } + }, + "ID": "voi-388", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V1", + "grid": [ + 5, + 5 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V4", + "grid": [ + 5, + 2 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V5", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S6", + "angle": 270, + "vertex": "V4", + "grid": [ + 5, + 1 + ] + } + ] + }, + "legacy_answer": "S1 0 V1 [5,5]\nS4 180 V4 [5,2]\nS5 0 V5 [3,4]\nS6 270 V4 [5,1]", + "solutionText": "S1 0 V1 [5,5]\nS4 180 V4 [5,2]\nS5 0 V5 [3,4]\nS6 270 V4 [5,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-388\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S2: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S6: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-389.json b/voi/data/voi-389.json new file mode 100644 index 0000000000000000000000000000000000000000..e92f828ddf9d14512f0cce03c4c490a588de2da0 --- /dev/null +++ b/voi/data/voi-389.json @@ -0,0 +1,269 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 4 + ], + [ + 4, + 5 + ], + [ + 1, + 5 + ], + [ + 1, + 4 + ] + ] + }, + { + "polygon": [ + [ + 8, + 9 + ], + [ + 5, + 9 + ], + [ + 5, + 7 + ], + [ + 8, + 7 + ] + ] + }, + { + "polygon": [ + [ + 2, + 3 + ], + [ + 5, + 3 + ], + [ + 5, + 5 + ], + [ + 2, + 5 + ] + ] + }, + { + "polygon": [ + [ + 4, + 8 + ], + [ + 4, + 5 + ], + [ + 5, + 6 + ], + [ + 5, + 8 + ] + ] + } + ], + "meta": { + "seed": 4206015, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.228164, + "contourComplexity": 46, + "connectedComponents": 2, + "fillRatio": 0.135313, + "difficultyScore": 0.866719, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 390, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-389/target.png", + "shapes": { + "S1": "../images/voi-389/shape_S1.png", + "S2": "../images/voi-389/shape_S2.png", + "S3": "../images/voi-389/shape_S3.png", + "S4": "../images/voi-389/shape_S4.png", + "S5": "../images/voi-389/shape_S5.png", + "S6": "../images/voi-389/shape_S6.png" + } + }, + "ID": "voi-389", + "answer": { + "placements": [ + { + "shape": "S3", + "angle": 270, + "vertex": "V2", + "grid": [ + 4, + 5 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V4", + "grid": [ + 8, + 7 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V2", + "grid": [ + 5, + 3 + ] + }, + { + "shape": "S6", + "angle": 90, + "vertex": "V4", + "grid": [ + 5, + 8 + ] + } + ] + }, + "legacy_answer": "S3 270 V2 [4,5]\nS4 180 V4 [8,7]\nS5 0 V2 [5,3]\nS6 90 V4 [5,8]", + "solutionText": "S3 270 V2 [4,5]\nS4 180 V4 [8,7]\nS5 0 V2 [5,3]\nS6 90 V4 [5,8]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-389\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S3: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S6: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-390.json b/voi/data/voi-390.json new file mode 100644 index 0000000000000000000000000000000000000000..a6047e9879ad6926a1fc013818a1289a9f5ea1a4 --- /dev/null +++ b/voi/data/voi-390.json @@ -0,0 +1,285 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 3 + ], + [ + 4, + 6 + ], + [ + 2, + 6 + ], + [ + 2, + 3 + ] + ] + }, + { + "polygon": [ + [ + 4, + 5 + ], + [ + 4, + 2 + ], + [ + 5, + 3 + ], + [ + 5, + 5 + ] + ] + }, + { + "polygon": [ + [ + 3, + 6 + ], + [ + 2, + 6 + ], + [ + 2, + 4 + ], + [ + 3, + 4 + ] + ] + }, + { + "polygon": [ + [ + 10, + 6 + ], + [ + 8, + 6 + ], + [ + 8, + 5 + ], + [ + 9, + 5 + ], + [ + 9, + 3 + ], + [ + 10, + 3 + ] + ] + } + ], + "meta": { + "seed": 4206016, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.275269, + "contourComplexity": 46, + "connectedComponents": 2, + "fillRatio": 0.105313, + "difficultyScore": 0.7383, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 391, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-390/target.png", + "shapes": { + "S1": "../images/voi-390/shape_S1.png", + "S2": "../images/voi-390/shape_S2.png", + "S3": "../images/voi-390/shape_S3.png", + "S4": "../images/voi-390/shape_S4.png", + "S5": "../images/voi-390/shape_S5.png", + "S6": "../images/voi-390/shape_S6.png" + } + }, + "ID": "voi-390", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V4", + "grid": [ + 2, + 3 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V2", + "grid": [ + 4, + 2 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V2", + "grid": [ + 2, + 6 + ] + }, + { + "shape": "S5", + "angle": 180, + "vertex": "V5", + "grid": [ + 9, + 3 + ] + } + ] + }, + "legacy_answer": "S1 270 V4 [2,3]\nS2 90 V2 [4,2]\nS3 180 V2 [2,6]\nS5 180 V5 [9,3]", + "solutionText": "S1 270 V4 [2,3]\nS2 90 V2 [4,2]\nS3 180 V2 [2,6]\nS5 180 V5 [9,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-390\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S6: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-391.json b/voi/data/voi-391.json new file mode 100644 index 0000000000000000000000000000000000000000..83ec6aaa199558b22a1c0b164dc678dd4581e240 --- /dev/null +++ b/voi/data/voi-391.json @@ -0,0 +1,285 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 1 + ], + [ + 6, + 3 + ], + [ + 5, + 3 + ], + [ + 5, + 2 + ], + [ + 3, + 2 + ], + [ + 3, + 1 + ] + ] + }, + { + "polygon": [ + [ + 3, + 3 + ], + [ + 3, + 4 + ], + [ + 1, + 4 + ], + [ + 1, + 3 + ] + ] + }, + { + "polygon": [ + [ + 8, + 1 + ], + [ + 5, + 1 + ], + [ + 5, + 0 + ], + [ + 8, + 0 + ] + ] + }, + { + "polygon": [ + [ + 4, + 4 + ], + [ + 1, + 4 + ], + [ + 1, + 2 + ], + [ + 4, + 2 + ] + ] + } + ], + "meta": { + "seed": 4206017, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.266667, + "contourComplexity": 16, + "connectedComponents": 1, + "fillRatio": 0.11, + "difficultyScore": 0.513333, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 392, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-391/target.png", + "shapes": { + "S1": "../images/voi-391/shape_S1.png", + "S2": "../images/voi-391/shape_S2.png", + "S3": "../images/voi-391/shape_S3.png", + "S4": "../images/voi-391/shape_S4.png", + "S5": "../images/voi-391/shape_S5.png", + "S6": "../images/voi-391/shape_S6.png" + } + }, + "ID": "voi-391", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 270, + "vertex": "V6", + "grid": [ + 3, + 1 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V4", + "grid": [ + 1, + 3 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V2", + "grid": [ + 5, + 1 + ] + }, + { + "shape": "S5", + "angle": 180, + "vertex": "V4", + "grid": [ + 4, + 2 + ] + } + ] + }, + "legacy_answer": "S2 270 V6 [3,1]\nS3 270 V4 [1,3]\nS4 180 V2 [5,1]\nS5 180 V4 [4,2]", + "solutionText": "S2 270 V6 [3,1]\nS3 270 V4 [1,3]\nS4 180 V2 [5,1]\nS5 180 V4 [4,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-391\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S6: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-392.json b/voi/data/voi-392.json new file mode 100644 index 0000000000000000000000000000000000000000..30dae166a3e0f8ac8162b95245de5ea8e89a0ee6 --- /dev/null +++ b/voi/data/voi-392.json @@ -0,0 +1,301 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 4 + ], + [ + 2, + 4 + ], + [ + 2, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 1 + ], + [ + 4, + 1 + ] + ] + }, + { + "polygon": [ + [ + 3, + 10 + ], + [ + 1, + 10 + ], + [ + 1, + 9 + ], + [ + 2, + 9 + ], + [ + 2, + 7 + ], + [ + 3, + 7 + ] + ] + }, + { + "polygon": [ + [ + 4, + 0 + ], + [ + 5, + 0 + ], + [ + 5, + 3 + ], + [ + 4, + 3 + ] + ] + }, + { + "polygon": [ + [ + 2, + 3 + ], + [ + 5, + 3 + ], + [ + 5, + 4 + ], + [ + 2, + 4 + ] + ] + } + ], + "meta": { + "seed": 4206018, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "contourComplexity": 14, + "connectedComponents": 2, + "fillRatio": 0.1, + "difficultyScore": 0.707143, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 393, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-392/target.png", + "shapes": { + "S1": "../images/voi-392/shape_S1.png", + "S2": "../images/voi-392/shape_S2.png", + "S3": "../images/voi-392/shape_S3.png", + "S4": "../images/voi-392/shape_S4.png", + "S5": "../images/voi-392/shape_S5.png", + "S6": "../images/voi-392/shape_S6.png" + } + }, + "ID": "voi-392", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V1", + "grid": [ + 4, + 4 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V6", + "grid": [ + 3, + 7 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V1", + "grid": [ + 4, + 0 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V3", + "grid": [ + 5, + 4 + ] + } + ] + }, + "legacy_answer": "S1 180 V1 [4,4]\nS2 180 V6 [3,7]\nS3 0 V1 [4,0]\nS4 0 V3 [5,4]", + "solutionText": "S1 180 V1 [4,4]\nS2 180 V6 [3,7]\nS3 0 V1 [4,0]\nS4 0 V3 [5,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-392\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S4: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S5: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S6: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-393.json b/voi/data/voi-393.json new file mode 100644 index 0000000000000000000000000000000000000000..b489e68a803a2ff8da9ecd49f8ced2a3eef162ba --- /dev/null +++ b/voi/data/voi-393.json @@ -0,0 +1,281 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 8 + ], + [ + 1, + 8 + ], + [ + 1, + 7 + ], + [ + 2, + 7 + ], + [ + 2, + 5 + ], + [ + 3, + 5 + ] + ] + }, + { + "polygon": [ + [ + 0, + 7 + ], + [ + 0, + 6 + ], + [ + 3, + 6 + ], + [ + 3, + 7 + ] + ] + }, + { + "polygon": [ + [ + 2, + 9 + ], + [ + 2, + 6 + ], + [ + 4, + 6 + ], + [ + 4, + 9 + ] + ] + }, + { + "polygon": [ + [ + 9, + 8 + ], + [ + 9, + 9 + ], + [ + 6, + 9 + ], + [ + 6, + 8 + ] + ] + } + ], + "meta": { + "seed": 4206019, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.25, + "contourComplexity": 21, + "connectedComponents": 2, + "fillRatio": 0.12, + "difficultyScore": 0.81, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 394, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-393/target.png", + "shapes": { + "S1": "../images/voi-393/shape_S1.png", + "S2": "../images/voi-393/shape_S2.png", + "S3": "../images/voi-393/shape_S3.png", + "S4": "../images/voi-393/shape_S4.png", + "S5": "../images/voi-393/shape_S5.png", + "S6": "../images/voi-393/shape_S6.png" + } + }, + "ID": "voi-393", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V2", + "grid": [ + 1, + 8 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V2", + "grid": [ + 0, + 6 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V4", + "grid": [ + 4, + 9 + ] + }, + { + "shape": "S6", + "angle": 270, + "vertex": "V3", + "grid": [ + 6, + 9 + ] + } + ] + }, + "legacy_answer": "S1 180 V2 [1,8]\nS4 90 V2 [0,6]\nS5 90 V4 [4,9]\nS6 270 V3 [6,9]", + "solutionText": "S1 180 V2 [1,8]\nS4 90 V2 [0,6]\nS5 90 V4 [4,9]\nS6 270 V3 [6,9]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-393\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S6: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-394.json b/voi/data/voi-394.json new file mode 100644 index 0000000000000000000000000000000000000000..4331c320cff88cf4f61f30ebbaf24082ec222ad1 --- /dev/null +++ b/voi/data/voi-394.json @@ -0,0 +1,257 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 8, + 4 + ], + [ + 8, + 5 + ], + [ + 6, + 5 + ], + [ + 6, + 4 + ] + ] + }, + { + "polygon": [ + [ + 5, + 3 + ], + [ + 8, + 3 + ], + [ + 8, + 5 + ], + [ + 5, + 5 + ] + ] + }, + { + "polygon": [ + [ + 8, + 8 + ], + [ + 8, + 5 + ], + [ + 10, + 5 + ], + [ + 10, + 8 + ] + ] + }, + { + "polygon": [ + [ + 4, + 4 + ], + [ + 5, + 4 + ], + [ + 4, + 5 + ] + ] + } + ], + "meta": { + "seed": 4206020, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.275269, + "contourComplexity": 44, + "connectedComponents": 2, + "fillRatio": 0.105313, + "difficultyScore": 0.7383, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 395, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-394/target.png", + "shapes": { + "S1": "../images/voi-394/shape_S1.png", + "S2": "../images/voi-394/shape_S2.png", + "S3": "../images/voi-394/shape_S3.png", + "S4": "../images/voi-394/shape_S4.png", + "S5": "../images/voi-394/shape_S5.png", + "S6": "../images/voi-394/shape_S6.png" + } + }, + "ID": "voi-394", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V1", + "grid": [ + 8, + 4 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V4", + "grid": [ + 5, + 5 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V2", + "grid": [ + 8, + 5 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V2", + "grid": [ + 5, + 4 + ] + } + ] + }, + "legacy_answer": "S1 270 V1 [8,4]\nS2 0 V4 [5,5]\nS3 90 V2 [8,5]\nS5 0 V2 [5,4]", + "solutionText": "S1 270 V1 [8,4]\nS2 0 V4 [5,5]\nS3 90 V2 [8,5]\nS5 0 V2 [5,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-394\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S5: V1=[0,0], V2=[1,0], V3=[0,1]\n- S6: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-395.json b/voi/data/voi-395.json new file mode 100644 index 0000000000000000000000000000000000000000..8f6d760371f274a51e2c8870e7ba0d1f4a0aa694 --- /dev/null +++ b/voi/data/voi-395.json @@ -0,0 +1,265 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 7 + ], + [ + 1, + 7 + ], + [ + 1, + 5 + ], + [ + 4, + 5 + ] + ] + }, + { + "polygon": [ + [ + 7, + 2 + ], + [ + 7, + 1 + ], + [ + 8, + 1 + ], + [ + 8, + 2 + ] + ] + }, + { + "polygon": [ + [ + 4, + 1 + ], + [ + 4, + 0 + ], + [ + 6, + 0 + ], + [ + 6, + 1 + ] + ] + }, + { + "polygon": [ + [ + 4, + 0 + ], + [ + 7, + 0 + ], + [ + 7, + 2 + ], + [ + 4, + 2 + ] + ] + } + ], + "meta": { + "seed": 4206021, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.266667, + "contourComplexity": 12, + "connectedComponents": 2, + "fillRatio": 0.11, + "difficultyScore": 0.763333, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 396, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-395/target.png", + "shapes": { + "S1": "../images/voi-395/shape_S1.png", + "S2": "../images/voi-395/shape_S2.png", + "S3": "../images/voi-395/shape_S3.png", + "S4": "../images/voi-395/shape_S4.png", + "S5": "../images/voi-395/shape_S5.png", + "S6": "../images/voi-395/shape_S6.png" + } + }, + "ID": "voi-395", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V4", + "grid": [ + 4, + 5 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V3", + "grid": [ + 8, + 1 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V1", + "grid": [ + 4, + 1 + ] + }, + { + "shape": "S6", + "angle": 0, + "vertex": "V2", + "grid": [ + 7, + 0 + ] + } + ] + }, + "legacy_answer": "S1 180 V4 [4,5]\nS2 90 V3 [8,1]\nS3 90 V1 [4,1]\nS6 0 V2 [7,0]", + "solutionText": "S1 180 V4 [4,5]\nS2 90 V3 [8,1]\nS3 90 V1 [4,1]\nS6 0 V2 [7,0]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-395\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S3: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[0,2]\n- S6: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-396.json b/voi/data/voi-396.json new file mode 100644 index 0000000000000000000000000000000000000000..dfc72cc8ab98b7159f3d71dfc56f49e06ae3fc7e --- /dev/null +++ b/voi/data/voi-396.json @@ -0,0 +1,277 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 7, + 3 + ], + [ + 8, + 3 + ], + [ + 8, + 5 + ], + [ + 7, + 5 + ] + ] + }, + { + "polygon": [ + [ + 6, + 10 + ], + [ + 4, + 10 + ], + [ + 4, + 9 + ], + [ + 5, + 9 + ], + [ + 5, + 7 + ], + [ + 6, + 7 + ] + ] + }, + { + "polygon": [ + [ + 10, + 4 + ], + [ + 8, + 4 + ], + [ + 10, + 2 + ] + ] + }, + { + "polygon": [ + [ + 6, + 6 + ], + [ + 6, + 9 + ], + [ + 4, + 9 + ], + [ + 4, + 6 + ] + ] + } + ], + "meta": { + "seed": 4206022, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.284444, + "contourComplexity": 78, + "connectedComponents": 2, + "fillRatio": 0.100625, + "difficultyScore": 0.710972, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 397, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-396/target.png", + "shapes": { + "S1": "../images/voi-396/shape_S1.png", + "S2": "../images/voi-396/shape_S2.png", + "S3": "../images/voi-396/shape_S3.png", + "S4": "../images/voi-396/shape_S4.png", + "S5": "../images/voi-396/shape_S5.png", + "S6": "../images/voi-396/shape_S6.png" + } + }, + "ID": "voi-396", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V4", + "grid": [ + 7, + 5 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V2", + "grid": [ + 4, + 10 + ] + }, + { + "shape": "S5", + "angle": 180, + "vertex": "V1", + "grid": [ + 10, + 4 + ] + }, + { + "shape": "S6", + "angle": 270, + "vertex": "V2", + "grid": [ + 6, + 9 + ] + } + ] + }, + "legacy_answer": "S1 0 V4 [7,5]\nS3 180 V2 [4,10]\nS5 180 V1 [10,4]\nS6 270 V2 [6,9]", + "solutionText": "S1 0 V4 [7,5]\nS3 180 V2 [4,10]\nS5 180 V1 [10,4]\nS6 270 V2 [6,9]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-396\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[0,2]\n- S6: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-397.json b/voi/data/voi-397.json new file mode 100644 index 0000000000000000000000000000000000000000..b2ad33a0ebb4ca6f468b0440fe1f895d9dc5baaf --- /dev/null +++ b/voi/data/voi-397.json @@ -0,0 +1,253 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 10 + ], + [ + 1, + 10 + ], + [ + 2, + 9 + ] + ] + }, + { + "polygon": [ + [ + 3, + 4 + ], + [ + 0, + 4 + ], + [ + 0, + 2 + ], + [ + 3, + 2 + ] + ] + }, + { + "polygon": [ + [ + 1, + 0 + ], + [ + 3, + 0 + ], + [ + 1, + 2 + ] + ] + }, + { + "polygon": [ + [ + 4, + 2 + ], + [ + 1, + 2 + ], + [ + 1, + 0 + ], + [ + 4, + 0 + ] + ] + } + ], + "meta": { + "seed": 4206023, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.282655, + "contourComplexity": 104, + "connectedComponents": 2, + "fillRatio": 0.104688, + "difficultyScore": 0.710004, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 398, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-397/target.png", + "shapes": { + "S1": "../images/voi-397/shape_S1.png", + "S2": "../images/voi-397/shape_S2.png", + "S3": "../images/voi-397/shape_S3.png", + "S4": "../images/voi-397/shape_S4.png", + "S5": "../images/voi-397/shape_S5.png", + "S6": "../images/voi-397/shape_S6.png" + } + }, + "ID": "voi-397", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V1", + "grid": [ + 2, + 10 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V4", + "grid": [ + 3, + 2 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V2", + "grid": [ + 3, + 0 + ] + }, + { + "shape": "S6", + "angle": 180, + "vertex": "V2", + "grid": [ + 1, + 2 + ] + } + ] + }, + "legacy_answer": "S1 180 V1 [2,10]\nS2 180 V4 [3,2]\nS3 0 V2 [3,0]\nS6 180 V2 [1,2]", + "solutionText": "S1 180 V1 [2,10]\nS2 180 V4 [3,2]\nS3 0 V2 [3,0]\nS6 180 V2 [1,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-397\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S6: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-398.json b/voi/data/voi-398.json new file mode 100644 index 0000000000000000000000000000000000000000..235153e16f80aa52ca36e6a73124287d2eb1f327 --- /dev/null +++ b/voi/data/voi-398.json @@ -0,0 +1,269 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 7 + ], + [ + 8, + 7 + ], + [ + 8, + 9 + ], + [ + 5, + 9 + ] + ] + }, + { + "polygon": [ + [ + 7, + 9 + ], + [ + 4, + 9 + ], + [ + 4, + 8 + ], + [ + 7, + 8 + ] + ] + }, + { + "polygon": [ + [ + 3, + 10 + ], + [ + 3, + 9 + ], + [ + 6, + 9 + ], + [ + 6, + 10 + ] + ] + }, + { + "polygon": [ + [ + 1, + 9 + ], + [ + 1, + 8 + ], + [ + 4, + 8 + ], + [ + 4, + 9 + ] + ] + } + ], + "meta": { + "seed": 4206024, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.266667, + "contourComplexity": 14, + "connectedComponents": 2, + "fillRatio": 0.11, + "difficultyScore": 0.763333, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 399, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-398/target.png", + "shapes": { + "S1": "../images/voi-398/shape_S1.png", + "S2": "../images/voi-398/shape_S2.png", + "S3": "../images/voi-398/shape_S3.png", + "S4": "../images/voi-398/shape_S4.png", + "S5": "../images/voi-398/shape_S5.png", + "S6": "../images/voi-398/shape_S6.png" + } + }, + "ID": "voi-398", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V4", + "grid": [ + 5, + 9 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V4", + "grid": [ + 7, + 8 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V3", + "grid": [ + 6, + 9 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V2", + "grid": [ + 1, + 8 + ] + } + ] + }, + "legacy_answer": "S1 0 V4 [5,9]\nS2 180 V4 [7,8]\nS3 90 V3 [6,9]\nS4 90 V2 [1,8]", + "solutionText": "S1 0 V4 [5,9]\nS2 180 V4 [7,8]\nS3 90 V3 [6,9]\nS4 90 V2 [1,8]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-398\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S3: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S4: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S6: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-399.json b/voi/data/voi-399.json new file mode 100644 index 0000000000000000000000000000000000000000..38597e5e599a7a152886d2c035f9d441671a8f94 --- /dev/null +++ b/voi/data/voi-399.json @@ -0,0 +1,269 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 7, + 4 + ], + [ + 6, + 4 + ], + [ + 6, + 1 + ], + [ + 7, + 1 + ] + ] + }, + { + "polygon": [ + [ + 5, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 3 + ], + [ + 5, + 3 + ] + ] + }, + { + "polygon": [ + [ + 5, + 3 + ], + [ + 8, + 3 + ], + [ + 8, + 5 + ], + [ + 5, + 5 + ] + ] + }, + { + "polygon": [ + [ + 6, + 1 + ], + [ + 9, + 1 + ], + [ + 9, + 3 + ], + [ + 6, + 3 + ] + ] + } + ], + "meta": { + "seed": 4206025, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.352941, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.11, + "difficultyScore": 0.591765, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 400, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-399/target.png", + "shapes": { + "S1": "../images/voi-399/shape_S1.png", + "S2": "../images/voi-399/shape_S2.png", + "S3": "../images/voi-399/shape_S3.png", + "S4": "../images/voi-399/shape_S4.png", + "S5": "../images/voi-399/shape_S5.png", + "S6": "../images/voi-399/shape_S6.png" + } + }, + "ID": "voi-399", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 180, + "vertex": "V4", + "grid": [ + 7, + 1 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V2", + "grid": [ + 4, + 5 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V1", + "grid": [ + 5, + 3 + ] + }, + { + "shape": "S6", + "angle": 0, + "vertex": "V2", + "grid": [ + 9, + 1 + ] + } + ] + }, + "legacy_answer": "S2 180 V4 [7,1]\nS3 180 V2 [4,5]\nS5 0 V1 [5,3]\nS6 0 V2 [9,1]", + "solutionText": "S2 180 V4 [7,1]\nS3 180 V2 [4,5]\nS5 0 V1 [5,3]\nS6 0 V2 [9,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-399\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S2: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S3: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S6: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-400.json b/voi/data/voi-400.json new file mode 100644 index 0000000000000000000000000000000000000000..b72dcfb552ceaa809c89ee5e0c66dab46b71db54 --- /dev/null +++ b/voi/data/voi-400.json @@ -0,0 +1,269 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 4 + ], + [ + 6, + 2 + ], + [ + 8, + 2 + ], + [ + 8, + 4 + ] + ] + }, + { + "polygon": [ + [ + 4, + 2 + ], + [ + 4, + 1 + ], + [ + 7, + 1 + ], + [ + 7, + 2 + ] + ] + }, + { + "polygon": [ + [ + 9, + 1 + ], + [ + 9, + 4 + ], + [ + 7, + 4 + ], + [ + 7, + 1 + ] + ] + }, + { + "polygon": [ + [ + 4, + 9 + ], + [ + 4, + 7 + ], + [ + 6, + 9 + ] + ] + } + ], + "meta": { + "seed": 4206026, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.26556, + "contourComplexity": 76, + "connectedComponents": 2, + "fillRatio": 0.110625, + "difficultyScore": 0.766509, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 401, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-400/target.png", + "shapes": { + "S1": "../images/voi-400/shape_S1.png", + "S2": "../images/voi-400/shape_S2.png", + "S3": "../images/voi-400/shape_S3.png", + "S4": "../images/voi-400/shape_S4.png", + "S5": "../images/voi-400/shape_S5.png", + "S6": "../images/voi-400/shape_S6.png" + } + }, + "ID": "voi-400", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V2", + "grid": [ + 6, + 2 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V2", + "grid": [ + 4, + 1 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V2", + "grid": [ + 9, + 4 + ] + }, + { + "shape": "S6", + "angle": 90, + "vertex": "V3", + "grid": [ + 6, + 9 + ] + } + ] + }, + "legacy_answer": "S1 90 V2 [6,2]\nS3 90 V2 [4,1]\nS4 270 V2 [9,4]\nS6 90 V3 [6,9]", + "solutionText": "S1 90 V2 [6,2]\nS3 90 V2 [4,1]\nS4 270 V2 [9,4]\nS6 90 V3 [6,9]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-400\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S6: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-401.json b/voi/data/voi-401.json new file mode 100644 index 0000000000000000000000000000000000000000..526d2a8eaa7a6f4c669c90f46ed7440fd73c3324 --- /dev/null +++ b/voi/data/voi-401.json @@ -0,0 +1,285 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 7, + 8 + ], + [ + 7, + 5 + ], + [ + 9, + 5 + ], + [ + 9, + 8 + ] + ] + }, + { + "polygon": [ + [ + 6, + 10 + ], + [ + 4, + 10 + ], + [ + 4, + 9 + ], + [ + 5, + 9 + ], + [ + 5, + 7 + ], + [ + 6, + 7 + ] + ] + }, + { + "polygon": [ + [ + 8, + 8 + ], + [ + 5, + 8 + ], + [ + 5, + 6 + ], + [ + 8, + 6 + ] + ] + }, + { + "polygon": [ + [ + 7, + 6 + ], + [ + 8, + 6 + ], + [ + 8, + 8 + ], + [ + 7, + 8 + ] + ] + } + ], + "meta": { + "seed": 4206027, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.333333, + "contourComplexity": 14, + "connectedComponents": 2, + "fillRatio": 0.12, + "difficultyScore": 0.743333, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 402, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-401/target.png", + "shapes": { + "S1": "../images/voi-401/shape_S1.png", + "S2": "../images/voi-401/shape_S2.png", + "S3": "../images/voi-401/shape_S3.png", + "S4": "../images/voi-401/shape_S4.png", + "S5": "../images/voi-401/shape_S5.png", + "S6": "../images/voi-401/shape_S6.png" + } + }, + "ID": "voi-401", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V4", + "grid": [ + 9, + 8 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V5", + "grid": [ + 5, + 7 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V4", + "grid": [ + 8, + 6 + ] + }, + { + "shape": "S6", + "angle": 0, + "vertex": "V3", + "grid": [ + 8, + 8 + ] + } + ] + }, + "legacy_answer": "S1 90 V4 [9,8]\nS2 180 V5 [5,7]\nS4 180 V4 [8,6]\nS6 0 V3 [8,8]", + "solutionText": "S1 90 V4 [9,8]\nS2 180 V5 [5,7]\nS4 180 V4 [8,6]\nS6 0 V3 [8,8]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-401\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S6: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-402.json b/voi/data/voi-402.json new file mode 100644 index 0000000000000000000000000000000000000000..ee2b3b3daf1c4f090a416531374e187452096fa7 --- /dev/null +++ b/voi/data/voi-402.json @@ -0,0 +1,285 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 8 + ], + [ + 3, + 6 + ], + [ + 4, + 6 + ], + [ + 4, + 7 + ], + [ + 6, + 7 + ], + [ + 6, + 8 + ] + ] + }, + { + "polygon": [ + [ + 3, + 8 + ], + [ + 4, + 8 + ], + [ + 4, + 10 + ], + [ + 3, + 10 + ] + ] + }, + { + "polygon": [ + [ + 1, + 7 + ], + [ + 1, + 4 + ], + [ + 2, + 4 + ], + [ + 2, + 7 + ] + ] + }, + { + "polygon": [ + [ + 6, + 5 + ], + [ + 6, + 8 + ], + [ + 4, + 8 + ], + [ + 4, + 5 + ] + ] + } + ], + "meta": { + "seed": 4206028, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.266667, + "contourComplexity": 12, + "connectedComponents": 2, + "fillRatio": 0.11, + "difficultyScore": 0.763333, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 403, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-402/target.png", + "shapes": { + "S1": "../images/voi-402/shape_S1.png", + "S2": "../images/voi-402/shape_S2.png", + "S3": "../images/voi-402/shape_S3.png", + "S4": "../images/voi-402/shape_S4.png", + "S5": "../images/voi-402/shape_S5.png", + "S6": "../images/voi-402/shape_S6.png" + } + }, + "ID": "voi-402", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 90, + "vertex": "V6", + "grid": [ + 6, + 8 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V1", + "grid": [ + 3, + 8 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V3", + "grid": [ + 2, + 4 + ] + }, + { + "shape": "S6", + "angle": 270, + "vertex": "V1", + "grid": [ + 6, + 5 + ] + } + ] + }, + "legacy_answer": "S2 90 V6 [6,8]\nS4 0 V1 [3,8]\nS5 90 V3 [2,4]\nS6 270 V1 [6,5]", + "solutionText": "S2 90 V6 [6,8]\nS4 0 V1 [3,8]\nS5 90 V3 [2,4]\nS6 270 V1 [6,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-402\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S4: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S6: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-403.json b/voi/data/voi-403.json new file mode 100644 index 0000000000000000000000000000000000000000..306c1c9cb22be6591b353ef347b2d01b088de853 --- /dev/null +++ b/voi/data/voi-403.json @@ -0,0 +1,285 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 6 + ], + [ + 4, + 6 + ], + [ + 4, + 5 + ], + [ + 5, + 5 + ], + [ + 5, + 3 + ], + [ + 6, + 3 + ] + ] + }, + { + "polygon": [ + [ + 4, + 6 + ], + [ + 6, + 6 + ], + [ + 6, + 8 + ], + [ + 4, + 8 + ] + ] + }, + { + "polygon": [ + [ + 7, + 2 + ], + [ + 4, + 2 + ], + [ + 4, + 1 + ], + [ + 7, + 1 + ] + ] + }, + { + "polygon": [ + [ + 6, + 2 + ], + [ + 6, + 5 + ], + [ + 5, + 5 + ], + [ + 5, + 2 + ] + ] + } + ], + "meta": { + "seed": 4206029, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "contourComplexity": 12, + "connectedComponents": 2, + "fillRatio": 0.1, + "difficultyScore": 0.707143, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 404, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-403/target.png", + "shapes": { + "S1": "../images/voi-403/shape_S1.png", + "S2": "../images/voi-403/shape_S2.png", + "S3": "../images/voi-403/shape_S3.png", + "S4": "../images/voi-403/shape_S4.png", + "S5": "../images/voi-403/shape_S5.png", + "S6": "../images/voi-403/shape_S6.png" + } + }, + "ID": "voi-403", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 180, + "vertex": "V6", + "grid": [ + 6, + 3 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V4", + "grid": [ + 4, + 8 + ] + }, + { + "shape": "S5", + "angle": 180, + "vertex": "V2", + "grid": [ + 4, + 2 + ] + }, + { + "shape": "S6", + "angle": 270, + "vertex": "V3", + "grid": [ + 5, + 5 + ] + } + ] + }, + "legacy_answer": "S2 180 V6 [6,3]\nS3 0 V4 [4,8]\nS5 180 V2 [4,2]\nS6 270 V3 [5,5]", + "solutionText": "S2 180 V6 [6,3]\nS3 0 V4 [4,8]\nS5 180 V2 [4,2]\nS6 270 V3 [5,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-403\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S5: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S6: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-404.json b/voi/data/voi-404.json new file mode 100644 index 0000000000000000000000000000000000000000..14422d2b84403bdfe2c153b7d1da9d82dc1835d6 --- /dev/null +++ b/voi/data/voi-404.json @@ -0,0 +1,285 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 9, + 5 + ], + [ + 8, + 5 + ], + [ + 8, + 2 + ], + [ + 9, + 2 + ] + ] + }, + { + "polygon": [ + [ + 7, + 3 + ], + [ + 9, + 3 + ], + [ + 9, + 4 + ], + [ + 8, + 4 + ], + [ + 8, + 6 + ], + [ + 7, + 6 + ] + ] + }, + { + "polygon": [ + [ + 7, + 4 + ], + [ + 7, + 3 + ], + [ + 10, + 3 + ], + [ + 10, + 4 + ] + ] + }, + { + "polygon": [ + [ + 5, + 9 + ], + [ + 3, + 9 + ], + [ + 3, + 7 + ], + [ + 5, + 7 + ] + ] + } + ], + "meta": { + "seed": 4206030, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "contourComplexity": 16, + "connectedComponents": 2, + "fillRatio": 0.1, + "difficultyScore": 0.707143, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 405, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-404/target.png", + "shapes": { + "S1": "../images/voi-404/shape_S1.png", + "S2": "../images/voi-404/shape_S2.png", + "S3": "../images/voi-404/shape_S3.png", + "S4": "../images/voi-404/shape_S4.png", + "S5": "../images/voi-404/shape_S5.png", + "S6": "../images/voi-404/shape_S6.png" + } + }, + "ID": "voi-404", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V1", + "grid": [ + 9, + 5 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V2", + "grid": [ + 9, + 3 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V1", + "grid": [ + 7, + 4 + ] + }, + { + "shape": "S5", + "angle": 180, + "vertex": "V2", + "grid": [ + 3, + 9 + ] + } + ] + }, + "legacy_answer": "S1 180 V1 [9,5]\nS2 0 V2 [9,3]\nS3 90 V1 [7,4]\nS5 180 V2 [3,9]", + "solutionText": "S1 180 V1 [9,5]\nS2 0 V2 [9,3]\nS3 90 V1 [7,4]\nS5 180 V2 [3,9]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-404\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S6: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-405.json b/voi/data/voi-405.json new file mode 100644 index 0000000000000000000000000000000000000000..f4a2ca1838398029f265c29f415da78083df015a --- /dev/null +++ b/voi/data/voi-405.json @@ -0,0 +1,281 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 9 + ], + [ + 7, + 9 + ], + [ + 6, + 10 + ], + [ + 4, + 10 + ] + ] + }, + { + "polygon": [ + [ + 6, + 9 + ], + [ + 6, + 7 + ], + [ + 7, + 7 + ], + [ + 7, + 8 + ], + [ + 9, + 8 + ], + [ + 9, + 9 + ] + ] + }, + { + "polygon": [ + [ + 7, + 10 + ], + [ + 7, + 7 + ], + [ + 9, + 7 + ], + [ + 9, + 10 + ] + ] + }, + { + "polygon": [ + [ + 1, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 4 + ], + [ + 1, + 4 + ] + ] + } + ], + "meta": { + "seed": 4206031, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.275269, + "contourComplexity": 46, + "connectedComponents": 2, + "fillRatio": 0.105313, + "difficultyScore": 0.7383, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 406, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-405/target.png", + "shapes": { + "S1": "../images/voi-405/shape_S1.png", + "S2": "../images/voi-405/shape_S2.png", + "S3": "../images/voi-405/shape_S3.png", + "S4": "../images/voi-405/shape_S4.png", + "S5": "../images/voi-405/shape_S5.png", + "S6": "../images/voi-405/shape_S6.png" + } + }, + "ID": "voi-405", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 0, + "vertex": "V3", + "grid": [ + 6, + 10 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V1", + "grid": [ + 6, + 9 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V4", + "grid": [ + 9, + 10 + ] + }, + { + "shape": "S6", + "angle": 0, + "vertex": "V1", + "grid": [ + 1, + 3 + ] + } + ] + }, + "legacy_answer": "S2 0 V3 [6,10]\nS3 90 V1 [6,9]\nS5 90 V4 [9,10]\nS6 0 V1 [1,3]", + "solutionText": "S2 0 V3 [6,10]\nS3 90 V1 [6,9]\nS5 90 V4 [9,10]\nS6 0 V1 [1,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-405\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S2: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S6: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-406.json b/voi/data/voi-406.json new file mode 100644 index 0000000000000000000000000000000000000000..079cb68657e9dce3d60a51965ff5a38c24023c9c --- /dev/null +++ b/voi/data/voi-406.json @@ -0,0 +1,249 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 0, + 6 + ], + [ + 0, + 4 + ], + [ + 2, + 6 + ] + ] + }, + { + "polygon": [ + [ + 1, + 7 + ], + [ + 1, + 5 + ], + [ + 3, + 7 + ] + ] + }, + { + "polygon": [ + [ + 3, + 0 + ], + [ + 6, + 0 + ], + [ + 6, + 2 + ], + [ + 3, + 2 + ] + ] + }, + { + "polygon": [ + [ + 1, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 7 + ], + [ + 1, + 7 + ] + ] + } + ], + "meta": { + "seed": 4206032, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.292035, + "contourComplexity": 70, + "connectedComponents": 2, + "fillRatio": 0.1, + "difficultyScore": 0.681858, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 407, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-406/target.png", + "shapes": { + "S1": "../images/voi-406/shape_S1.png", + "S2": "../images/voi-406/shape_S2.png", + "S3": "../images/voi-406/shape_S3.png", + "S4": "../images/voi-406/shape_S4.png", + "S5": "../images/voi-406/shape_S5.png", + "S6": "../images/voi-406/shape_S6.png" + } + }, + "ID": "voi-406", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V2", + "grid": [ + 0, + 4 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V1", + "grid": [ + 1, + 7 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V1", + "grid": [ + 3, + 0 + ] + }, + { + "shape": "S6", + "angle": 0, + "vertex": "V3", + "grid": [ + 3, + 7 + ] + } + ] + }, + "legacy_answer": "S1 90 V2 [0,4]\nS2 90 V1 [1,7]\nS4 0 V1 [3,0]\nS6 0 V3 [3,7]", + "solutionText": "S1 90 V2 [0,4]\nS2 90 V1 [1,7]\nS4 0 V1 [3,0]\nS6 0 V3 [3,7]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-406\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S6: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-407.json b/voi/data/voi-407.json new file mode 100644 index 0000000000000000000000000000000000000000..df86cd5861b7a93cc0ad2543914640c2751ce68d --- /dev/null +++ b/voi/data/voi-407.json @@ -0,0 +1,269 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 4 + ], + [ + 2, + 7 + ], + [ + 0, + 7 + ], + [ + 0, + 4 + ] + ] + }, + { + "polygon": [ + [ + 0, + 3 + ], + [ + 0, + 0 + ], + [ + 1, + 1 + ], + [ + 1, + 3 + ] + ] + }, + { + "polygon": [ + [ + 1, + 7 + ], + [ + 4, + 7 + ], + [ + 4, + 9 + ], + [ + 1, + 9 + ] + ] + }, + { + "polygon": [ + [ + 1, + 5 + ], + [ + 1, + 8 + ], + [ + 0, + 7 + ], + [ + 0, + 5 + ] + ] + } + ], + "meta": { + "seed": 4206033, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.234432, + "contourComplexity": 76, + "connectedComponents": 2, + "fillRatio": 0.130625, + "difficultyScore": 0.851021, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 408, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-407/target.png", + "shapes": { + "S1": "../images/voi-407/shape_S1.png", + "S2": "../images/voi-407/shape_S2.png", + "S3": "../images/voi-407/shape_S3.png", + "S4": "../images/voi-407/shape_S4.png", + "S5": "../images/voi-407/shape_S5.png", + "S6": "../images/voi-407/shape_S6.png" + } + }, + "ID": "voi-407", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V2", + "grid": [ + 2, + 7 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V4", + "grid": [ + 1, + 3 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V4", + "grid": [ + 1, + 9 + ] + }, + { + "shape": "S5", + "angle": 270, + "vertex": "V3", + "grid": [ + 0, + 7 + ] + } + ] + }, + "legacy_answer": "S1 270 V2 [2,7]\nS2 90 V4 [1,3]\nS3 0 V4 [1,9]\nS5 270 V3 [0,7]", + "solutionText": "S1 270 V2 [2,7]\nS2 90 V4 [1,3]\nS3 0 V4 [1,9]\nS5 270 V3 [0,7]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-407\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S5: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S6: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-408.json b/voi/data/voi-408.json new file mode 100644 index 0000000000000000000000000000000000000000..babe76a88be1b9d5f98716a1495b811ad65c6edf --- /dev/null +++ b/voi/data/voi-408.json @@ -0,0 +1,281 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 1 + ], + [ + 6, + 3 + ], + [ + 5, + 3 + ], + [ + 5, + 2 + ], + [ + 3, + 2 + ], + [ + 3, + 1 + ] + ] + }, + { + "polygon": [ + [ + 1, + 6 + ], + [ + 1, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 6 + ] + ] + }, + { + "polygon": [ + [ + 6, + 1 + ], + [ + 6, + 4 + ], + [ + 4, + 4 + ], + [ + 4, + 1 + ] + ] + }, + { + "polygon": [ + [ + 0, + 1 + ], + [ + 3, + 1 + ], + [ + 3, + 3 + ], + [ + 0, + 3 + ] + ] + } + ], + "meta": { + "seed": 4206034, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.272727, + "contourComplexity": 14, + "connectedComponents": 2, + "fillRatio": 0.16, + "difficultyScore": 0.639091, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 409, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-408/target.png", + "shapes": { + "S1": "../images/voi-408/shape_S1.png", + "S2": "../images/voi-408/shape_S2.png", + "S3": "../images/voi-408/shape_S3.png", + "S4": "../images/voi-408/shape_S4.png", + "S5": "../images/voi-408/shape_S5.png", + "S6": "../images/voi-408/shape_S6.png" + } + }, + "ID": "voi-408", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V4", + "grid": [ + 5, + 2 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V4", + "grid": [ + 3, + 6 + ] + }, + { + "shape": "S5", + "angle": 270, + "vertex": "V4", + "grid": [ + 4, + 1 + ] + }, + { + "shape": "S6", + "angle": 0, + "vertex": "V3", + "grid": [ + 3, + 3 + ] + } + ] + }, + "legacy_answer": "S1 270 V4 [5,2]\nS2 90 V4 [3,6]\nS5 270 V4 [4,1]\nS6 0 V3 [3,3]", + "solutionText": "S1 270 V4 [5,2]\nS2 90 V4 [3,6]\nS5 270 V4 [4,1]\nS6 0 V3 [3,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-408\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[0,1]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S6: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-409.json b/voi/data/voi-409.json new file mode 100644 index 0000000000000000000000000000000000000000..c2bcf265adf3e1159038d73d533e57c7d7a79f77 --- /dev/null +++ b/voi/data/voi-409.json @@ -0,0 +1,277 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 2 + ], + [ + 7, + 2 + ], + [ + 7, + 3 + ], + [ + 5, + 3 + ] + ] + }, + { + "polygon": [ + [ + 6, + 1 + ], + [ + 6, + 0 + ], + [ + 9, + 0 + ], + [ + 9, + 1 + ] + ] + }, + { + "polygon": [ + [ + 4, + 1 + ], + [ + 7, + 1 + ], + [ + 7, + 3 + ], + [ + 4, + 3 + ] + ] + }, + { + "polygon": [ + [ + 4, + 4 + ], + [ + 1, + 4 + ], + [ + 1, + 2 + ], + [ + 4, + 2 + ] + ] + } + ], + "meta": { + "seed": 4206035, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.235294, + "contourComplexity": 14, + "connectedComponents": 1, + "fillRatio": 0.13, + "difficultyScore": 0.598824, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 410, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-409/target.png", + "shapes": { + "S1": "../images/voi-409/shape_S1.png", + "S2": "../images/voi-409/shape_S2.png", + "S3": "../images/voi-409/shape_S3.png", + "S4": "../images/voi-409/shape_S4.png", + "S5": "../images/voi-409/shape_S5.png", + "S6": "../images/voi-409/shape_S6.png" + } + }, + "ID": "voi-409", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V4", + "grid": [ + 5, + 3 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V1", + "grid": [ + 6, + 1 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V3", + "grid": [ + 7, + 3 + ] + }, + { + "shape": "S5", + "angle": 180, + "vertex": "V3", + "grid": [ + 1, + 2 + ] + } + ] + }, + "legacy_answer": "S1 0 V4 [5,3]\nS3 90 V1 [6,1]\nS4 0 V3 [7,3]\nS5 180 V3 [1,2]", + "solutionText": "S1 0 V4 [5,3]\nS3 90 V1 [6,1]\nS4 0 V3 [7,3]\nS5 180 V3 [1,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-409\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S6: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-410.json b/voi/data/voi-410.json new file mode 100644 index 0000000000000000000000000000000000000000..d8ffd35280d87217b9c0107f065cf217be5eb444 --- /dev/null +++ b/voi/data/voi-410.json @@ -0,0 +1,273 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 3 + ], + [ + 3, + 6 + ], + [ + 2, + 5 + ], + [ + 2, + 3 + ] + ] + }, + { + "polygon": [ + [ + 4, + 0 + ], + [ + 6, + 0 + ], + [ + 6, + 1 + ], + [ + 5, + 1 + ], + [ + 5, + 3 + ], + [ + 4, + 3 + ] + ] + }, + { + "polygon": [ + [ + 2, + 3 + ], + [ + 4, + 3 + ], + [ + 2, + 5 + ] + ] + }, + { + "polygon": [ + [ + 3, + 5 + ], + [ + 0, + 5 + ], + [ + 0, + 3 + ], + [ + 3, + 3 + ] + ] + } + ], + "meta": { + "seed": 4206036, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.27409, + "contourComplexity": 106, + "connectedComponents": 2, + "fillRatio": 0.105938, + "difficultyScore": 0.741765, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 411, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-410/target.png", + "shapes": { + "S1": "../images/voi-410/shape_S1.png", + "S2": "../images/voi-410/shape_S2.png", + "S3": "../images/voi-410/shape_S3.png", + "S4": "../images/voi-410/shape_S4.png", + "S5": "../images/voi-410/shape_S5.png", + "S6": "../images/voi-410/shape_S6.png" + } + }, + "ID": "voi-410", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 270, + "vertex": "V1", + "grid": [ + 3, + 3 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V4", + "grid": [ + 5, + 1 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V1", + "grid": [ + 2, + 3 + ] + }, + { + "shape": "S6", + "angle": 180, + "vertex": "V4", + "grid": [ + 3, + 3 + ] + } + ] + }, + "legacy_answer": "S2 270 V1 [3,3]\nS4 0 V4 [5,1]\nS5 0 V1 [2,3]\nS6 180 V4 [3,3]", + "solutionText": "S2 270 V1 [3,3]\nS4 0 V4 [5,1]\nS5 0 V1 [2,3]\nS6 180 V4 [3,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-410\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S5: V1=[0,0], V2=[2,0], V3=[0,2]\n- S6: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-411.json b/voi/data/voi-411.json new file mode 100644 index 0000000000000000000000000000000000000000..c728a7e12cd161e23cf11acfa0e643c662029cc8 --- /dev/null +++ b/voi/data/voi-411.json @@ -0,0 +1,285 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 1, + 5 + ], + [ + 4, + 5 + ], + [ + 4, + 7 + ], + [ + 1, + 7 + ] + ] + }, + { + "polygon": [ + [ + 5, + 7 + ], + [ + 3, + 7 + ], + [ + 3, + 6 + ], + [ + 4, + 6 + ], + [ + 4, + 4 + ], + [ + 5, + 4 + ] + ] + }, + { + "polygon": [ + [ + 4, + 4 + ], + [ + 4, + 7 + ], + [ + 3, + 7 + ], + [ + 3, + 4 + ] + ] + }, + { + "polygon": [ + [ + 0, + 4 + ], + [ + 2, + 4 + ], + [ + 2, + 5 + ], + [ + 0, + 5 + ] + ] + } + ], + "meta": { + "seed": 4206037, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.266667, + "contourComplexity": 15, + "connectedComponents": 1, + "fillRatio": 0.11, + "difficultyScore": 0.513333, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 412, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-411/target.png", + "shapes": { + "S1": "../images/voi-411/shape_S1.png", + "S2": "../images/voi-411/shape_S2.png", + "S3": "../images/voi-411/shape_S3.png", + "S4": "../images/voi-411/shape_S4.png", + "S5": "../images/voi-411/shape_S5.png", + "S6": "../images/voi-411/shape_S6.png" + } + }, + "ID": "voi-411", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 0, + "vertex": "V2", + "grid": [ + 4, + 5 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V5", + "grid": [ + 4, + 4 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V3", + "grid": [ + 3, + 7 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V4", + "grid": [ + 0, + 5 + ] + } + ] + }, + "legacy_answer": "S2 0 V2 [4,5]\nS3 180 V5 [4,4]\nS4 270 V3 [3,7]\nS5 0 V4 [0,5]", + "solutionText": "S2 0 V2 [4,5]\nS3 180 V5 [4,4]\nS4 270 V3 [3,7]\nS5 0 V4 [0,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-411\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S6: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-412.json b/voi/data/voi-412.json new file mode 100644 index 0000000000000000000000000000000000000000..f10cae639e0202c55a53356afe4aacd51c0f8e37 --- /dev/null +++ b/voi/data/voi-412.json @@ -0,0 +1,265 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 6 + ], + [ + 0, + 6 + ], + [ + 0, + 4 + ], + [ + 2, + 4 + ] + ] + }, + { + "polygon": [ + [ + 3, + 8 + ], + [ + 0, + 8 + ], + [ + 0, + 6 + ], + [ + 3, + 6 + ] + ] + }, + { + "polygon": [ + [ + 1, + 6 + ], + [ + 2, + 6 + ], + [ + 2, + 9 + ], + [ + 1, + 9 + ] + ] + }, + { + "polygon": [ + [ + 4, + 10 + ], + [ + 1, + 10 + ], + [ + 1, + 8 + ], + [ + 4, + 8 + ] + ] + } + ], + "meta": { + "seed": 4206038, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.315789, + "contourComplexity": 14, + "connectedComponents": 2, + "fillRatio": 0.13, + "difficultyScore": 0.653158, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 413, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-412/target.png", + "shapes": { + "S1": "../images/voi-412/shape_S1.png", + "S2": "../images/voi-412/shape_S2.png", + "S3": "../images/voi-412/shape_S3.png", + "S4": "../images/voi-412/shape_S4.png", + "S5": "../images/voi-412/shape_S5.png", + "S6": "../images/voi-412/shape_S6.png" + } + }, + "ID": "voi-412", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V2", + "grid": [ + 0, + 6 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V3", + "grid": [ + 0, + 6 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V4", + "grid": [ + 1, + 9 + ] + }, + { + "shape": "S6", + "angle": 180, + "vertex": "V3", + "grid": [ + 1, + 8 + ] + } + ] + }, + "legacy_answer": "S1 180 V2 [0,6]\nS2 180 V3 [0,6]\nS5 0 V4 [1,9]\nS6 180 V3 [1,8]", + "solutionText": "S1 180 V2 [0,6]\nS2 180 V3 [0,6]\nS5 0 V4 [1,9]\nS6 180 V3 [1,8]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-412\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n- S5: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S6: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-413.json b/voi/data/voi-413.json new file mode 100644 index 0000000000000000000000000000000000000000..fa0bb1ae83f095cad0dac2e41dc06df25482603d --- /dev/null +++ b/voi/data/voi-413.json @@ -0,0 +1,305 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 6, + 8 + ], + [ + 4, + 8 + ], + [ + 4, + 7 + ], + [ + 5, + 7 + ], + [ + 5, + 5 + ], + [ + 6, + 5 + ] + ] + }, + { + "polygon": [ + [ + 5, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 2 + ], + [ + 5, + 2 + ] + ] + }, + { + "polygon": [ + [ + 3, + 3 + ], + [ + 0, + 3 + ], + [ + 1, + 2 + ], + [ + 3, + 2 + ] + ] + }, + { + "polygon": [ + [ + 5, + 5 + ], + [ + 3, + 5 + ], + [ + 3, + 4 + ], + [ + 4, + 4 + ], + [ + 4, + 2 + ], + [ + 5, + 2 + ] + ] + } + ], + "meta": { + "seed": 4206039, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.275269, + "contourComplexity": 44, + "connectedComponents": 2, + "fillRatio": 0.105313, + "difficultyScore": 0.7383, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 414, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-413/target.png", + "shapes": { + "S1": "../images/voi-413/shape_S1.png", + "S2": "../images/voi-413/shape_S2.png", + "S3": "../images/voi-413/shape_S3.png", + "S4": "../images/voi-413/shape_S4.png", + "S5": "../images/voi-413/shape_S5.png", + "S6": "../images/voi-413/shape_S6.png" + } + }, + "ID": "voi-413", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V1", + "grid": [ + 6, + 8 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V2", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V4", + "grid": [ + 3, + 2 + ] + }, + { + "shape": "S6", + "angle": 180, + "vertex": "V5", + "grid": [ + 4, + 2 + ] + } + ] + }, + "legacy_answer": "S1 180 V1 [6,8]\nS2 180 V2 [3,4]\nS3 180 V4 [3,2]\nS6 180 V5 [4,2]", + "solutionText": "S1 180 V1 [6,8]\nS2 180 V2 [3,4]\nS3 180 V4 [3,2]\nS6 180 V5 [4,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-413\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S6: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-414.json b/voi/data/voi-414.json new file mode 100644 index 0000000000000000000000000000000000000000..95aecfdffca200d3627aa3fcf9babac56f1bc5a8 --- /dev/null +++ b/voi/data/voi-414.json @@ -0,0 +1,281 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 9, + 5 + ], + [ + 9, + 2 + ], + [ + 10, + 2 + ], + [ + 10, + 5 + ] + ] + }, + { + "polygon": [ + [ + 6, + 2 + ], + [ + 9, + 2 + ], + [ + 9, + 4 + ], + [ + 6, + 4 + ] + ] + }, + { + "polygon": [ + [ + 4, + 3 + ], + [ + 4, + 1 + ], + [ + 5, + 1 + ], + [ + 5, + 2 + ], + [ + 7, + 2 + ], + [ + 7, + 3 + ] + ] + }, + { + "polygon": [ + [ + 8, + 7 + ], + [ + 8, + 4 + ], + [ + 10, + 4 + ], + [ + 10, + 7 + ] + ] + } + ], + "meta": { + "seed": 4206040, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.210526, + "contourComplexity": 18, + "connectedComponents": 2, + "fillRatio": 0.15, + "difficultyScore": 0.907895, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 415, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-414/target.png", + "shapes": { + "S1": "../images/voi-414/shape_S1.png", + "S2": "../images/voi-414/shape_S2.png", + "S3": "../images/voi-414/shape_S3.png", + "S4": "../images/voi-414/shape_S4.png", + "S5": "../images/voi-414/shape_S5.png", + "S6": "../images/voi-414/shape_S6.png" + } + }, + "ID": "voi-414", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V2", + "grid": [ + 9, + 2 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V1", + "grid": [ + 6, + 2 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V6", + "grid": [ + 7, + 3 + ] + }, + { + "shape": "S6", + "angle": 90, + "vertex": "V3", + "grid": [ + 10, + 4 + ] + } + ] + }, + "legacy_answer": "S1 90 V2 [9,2]\nS3 0 V1 [6,2]\nS4 90 V6 [7,3]\nS6 90 V3 [10,4]", + "solutionText": "S1 90 V2 [9,2]\nS3 0 V1 [6,2]\nS4 90 V6 [7,3]\nS6 90 V3 [10,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-414\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S5: V1=[0,0], V2=[2,0], V3=[0,2]\n- S6: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-415.json b/voi/data/voi-415.json new file mode 100644 index 0000000000000000000000000000000000000000..11516bea70428fd420a46ce531e1ab707e6e2407 --- /dev/null +++ b/voi/data/voi-415.json @@ -0,0 +1,257 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 6 + ], + [ + 4, + 4 + ], + [ + 6, + 4 + ], + [ + 6, + 6 + ] + ] + }, + { + "polygon": [ + [ + 3, + 9 + ], + [ + 2, + 9 + ], + [ + 2, + 6 + ], + [ + 3, + 6 + ] + ] + }, + { + "polygon": [ + [ + 3, + 6 + ], + [ + 6, + 6 + ], + [ + 6, + 8 + ], + [ + 3, + 8 + ] + ] + }, + { + "polygon": [ + [ + 6, + 6 + ], + [ + 4, + 6 + ], + [ + 6, + 4 + ] + ] + } + ], + "meta": { + "seed": 4206041, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.273859, + "contourComplexity": 70, + "connectedComponents": 2, + "fillRatio": 0.109375, + "difficultyScore": 0.735814, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 416, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-415/target.png", + "shapes": { + "S1": "../images/voi-415/shape_S1.png", + "S2": "../images/voi-415/shape_S2.png", + "S3": "../images/voi-415/shape_S3.png", + "S4": "../images/voi-415/shape_S4.png", + "S5": "../images/voi-415/shape_S5.png", + "S6": "../images/voi-415/shape_S6.png" + } + }, + "ID": "voi-415", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 90, + "vertex": "V3", + "grid": [ + 6, + 4 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V3", + "grid": [ + 2, + 6 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V2", + "grid": [ + 6, + 6 + ] + }, + { + "shape": "S6", + "angle": 180, + "vertex": "V1", + "grid": [ + 6, + 6 + ] + } + ] + }, + "legacy_answer": "S2 90 V3 [6,4]\nS3 180 V3 [2,6]\nS4 0 V2 [6,6]\nS6 180 V1 [6,6]", + "solutionText": "S2 90 V3 [6,4]\nS3 180 V3 [2,6]\nS4 0 V2 [6,6]\nS6 180 V1 [6,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-415\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S6: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-416.json b/voi/data/voi-416.json new file mode 100644 index 0000000000000000000000000000000000000000..5dee2a78c56f6eecc485d22534880b6f46ef6318 --- /dev/null +++ b/voi/data/voi-416.json @@ -0,0 +1,265 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 4 + ], + [ + 5, + 6 + ], + [ + 3, + 6 + ], + [ + 3, + 4 + ] + ] + }, + { + "polygon": [ + [ + 4, + 7 + ], + [ + 4, + 6 + ], + [ + 6, + 6 + ], + [ + 6, + 7 + ] + ] + }, + { + "polygon": [ + [ + 3, + 6 + ], + [ + 6, + 6 + ], + [ + 6, + 8 + ], + [ + 3, + 8 + ] + ] + }, + { + "polygon": [ + [ + 2, + 0 + ], + [ + 2, + 2 + ], + [ + 1, + 2 + ], + [ + 1, + 0 + ] + ] + } + ], + "meta": { + "seed": 4206042, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "contourComplexity": 12, + "connectedComponents": 2, + "fillRatio": 0.1, + "difficultyScore": 0.707143, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 417, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-416/target.png", + "shapes": { + "S1": "../images/voi-416/shape_S1.png", + "S2": "../images/voi-416/shape_S2.png", + "S3": "../images/voi-416/shape_S3.png", + "S4": "../images/voi-416/shape_S4.png", + "S5": "../images/voi-416/shape_S5.png", + "S6": "../images/voi-416/shape_S6.png" + } + }, + "ID": "voi-416", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V2", + "grid": [ + 5, + 6 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V3", + "grid": [ + 6, + 6 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V4", + "grid": [ + 3, + 8 + ] + }, + { + "shape": "S5", + "angle": 270, + "vertex": "V3", + "grid": [ + 1, + 2 + ] + } + ] + }, + "legacy_answer": "S1 270 V2 [5,6]\nS3 90 V3 [6,6]\nS4 0 V4 [3,8]\nS5 270 V3 [1,2]", + "solutionText": "S1 270 V2 [5,6]\nS3 90 V3 [6,6]\nS4 0 V4 [3,8]\nS5 270 V3 [1,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-416\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S6: V1=[0,0], V2=[1,0], V3=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-417.json b/voi/data/voi-417.json new file mode 100644 index 0000000000000000000000000000000000000000..dd11365c094538f800109ed273a7e3185c9d684f --- /dev/null +++ b/voi/data/voi-417.json @@ -0,0 +1,281 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 3 + ], + [ + 8, + 3 + ], + [ + 8, + 5 + ], + [ + 5, + 5 + ] + ] + }, + { + "polygon": [ + [ + 6, + 6 + ], + [ + 5, + 6 + ], + [ + 5, + 3 + ], + [ + 6, + 3 + ] + ] + }, + { + "polygon": [ + [ + 5, + 9 + ], + [ + 4, + 9 + ], + [ + 4, + 8 + ], + [ + 5, + 8 + ] + ] + }, + { + "polygon": [ + [ + 5, + 8 + ], + [ + 3, + 8 + ], + [ + 3, + 7 + ], + [ + 4, + 7 + ], + [ + 4, + 5 + ], + [ + 5, + 5 + ] + ] + } + ], + "meta": { + "seed": 4206043, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "contourComplexity": 14, + "connectedComponents": 2, + "fillRatio": 0.1, + "difficultyScore": 0.707143, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 418, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-417/target.png", + "shapes": { + "S1": "../images/voi-417/shape_S1.png", + "S2": "../images/voi-417/shape_S2.png", + "S3": "../images/voi-417/shape_S3.png", + "S4": "../images/voi-417/shape_S4.png", + "S5": "../images/voi-417/shape_S5.png", + "S6": "../images/voi-417/shape_S6.png" + } + }, + "ID": "voi-417", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 0, + "vertex": "V3", + "grid": [ + 8, + 5 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V3", + "grid": [ + 5, + 3 + ] + }, + { + "shape": "S5", + "angle": 180, + "vertex": "V4", + "grid": [ + 5, + 8 + ] + }, + { + "shape": "S6", + "angle": 180, + "vertex": "V2", + "grid": [ + 3, + 8 + ] + } + ] + }, + "legacy_answer": "S2 0 V3 [8,5]\nS4 180 V3 [5,3]\nS5 180 V4 [5,8]\nS6 180 V2 [3,8]", + "solutionText": "S2 0 V3 [8,5]\nS4 180 V3 [5,3]\nS5 180 V4 [5,8]\nS6 180 V2 [3,8]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-417\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[0,1]\n- S4: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S5: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S6: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-418.json b/voi/data/voi-418.json new file mode 100644 index 0000000000000000000000000000000000000000..288f077e7d27ca770d4d2ca1fc998c26c791924c --- /dev/null +++ b/voi/data/voi-418.json @@ -0,0 +1,269 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 1, + 10 + ], + [ + 1, + 7 + ], + [ + 2, + 7 + ], + [ + 2, + 10 + ] + ] + }, + { + "polygon": [ + [ + 3, + 5 + ], + [ + 3, + 2 + ], + [ + 5, + 2 + ], + [ + 5, + 5 + ] + ] + }, + { + "polygon": [ + [ + 2, + 0 + ], + [ + 5, + 0 + ], + [ + 5, + 2 + ], + [ + 2, + 2 + ] + ] + }, + { + "polygon": [ + [ + 4, + 5 + ], + [ + 4, + 3 + ], + [ + 5, + 3 + ], + [ + 5, + 5 + ] + ] + } + ], + "meta": { + "seed": 4206044, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.235294, + "contourComplexity": 12, + "connectedComponents": 2, + "fillRatio": 0.13, + "difficultyScore": 0.848824, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 419, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-418/target.png", + "shapes": { + "S1": "../images/voi-418/shape_S1.png", + "S2": "../images/voi-418/shape_S2.png", + "S3": "../images/voi-418/shape_S3.png", + "S4": "../images/voi-418/shape_S4.png", + "S5": "../images/voi-418/shape_S5.png", + "S6": "../images/voi-418/shape_S6.png" + } + }, + "ID": "voi-418", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V3", + "grid": [ + 2, + 7 + ] + }, + { + "shape": "S2", + "angle": 90, + "vertex": "V1", + "grid": [ + 3, + 5 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V4", + "grid": [ + 2, + 2 + ] + }, + { + "shape": "S6", + "angle": 90, + "vertex": "V1", + "grid": [ + 4, + 5 + ] + } + ] + }, + "legacy_answer": "S1 90 V3 [2,7]\nS2 90 V1 [3,5]\nS5 0 V4 [2,2]\nS6 90 V1 [4,5]", + "solutionText": "S1 90 V3 [2,7]\nS2 90 V1 [3,5]\nS5 0 V4 [2,2]\nS6 90 V1 [4,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-418\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S6: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-419.json b/voi/data/voi-419.json new file mode 100644 index 0000000000000000000000000000000000000000..1b5e24e93656b8b90bd2d6862bfaa9038ec4298c --- /dev/null +++ b/voi/data/voi-419.json @@ -0,0 +1,269 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 3 + ], + [ + 0, + 3 + ], + [ + 0, + 1 + ], + [ + 3, + 1 + ] + ] + }, + { + "polygon": [ + [ + 0, + 7 + ], + [ + 2, + 7 + ], + [ + 2, + 9 + ], + [ + 0, + 9 + ] + ] + }, + { + "polygon": [ + [ + 5, + 0 + ], + [ + 5, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 0 + ] + ] + }, + { + "polygon": [ + [ + 3, + 0 + ], + [ + 5, + 0 + ], + [ + 5, + 1 + ], + [ + 3, + 1 + ] + ] + } + ], + "meta": { + "seed": 4206045, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "contourComplexity": 8, + "connectedComponents": 2, + "fillRatio": 0.14, + "difficultyScore": 0.881111, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 420, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-419/target.png", + "shapes": { + "S1": "../images/voi-419/shape_S1.png", + "S2": "../images/voi-419/shape_S2.png", + "S3": "../images/voi-419/shape_S3.png", + "S4": "../images/voi-419/shape_S4.png", + "S5": "../images/voi-419/shape_S5.png", + "S6": "../images/voi-419/shape_S6.png" + } + }, + "ID": "voi-419", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 180, + "vertex": "V2", + "grid": [ + 0, + 3 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V2", + "grid": [ + 2, + 7 + ] + }, + { + "shape": "S5", + "angle": 270, + "vertex": "V3", + "grid": [ + 3, + 3 + ] + }, + { + "shape": "S6", + "angle": 0, + "vertex": "V4", + "grid": [ + 3, + 1 + ] + } + ] + }, + "legacy_answer": "S2 180 V2 [0,3]\nS3 0 V2 [2,7]\nS5 270 V3 [3,3]\nS6 0 V4 [3,1]", + "solutionText": "S2 180 V2 [0,3]\nS3 0 V2 [2,7]\nS5 270 V3 [3,3]\nS6 0 V4 [3,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-419\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S6: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-420.json b/voi/data/voi-420.json new file mode 100644 index 0000000000000000000000000000000000000000..52c63a215551dcad73398bfd8cdd2f12dd0f5659 --- /dev/null +++ b/voi/data/voi-420.json @@ -0,0 +1,257 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 0, + 7 + ], + [ + 1, + 7 + ], + [ + 1, + 9 + ], + [ + 0, + 9 + ] + ] + }, + { + "polygon": [ + [ + 5, + 5 + ], + [ + 5, + 8 + ], + [ + 3, + 8 + ], + [ + 3, + 5 + ] + ] + }, + { + "polygon": [ + [ + 4, + 7 + ], + [ + 7, + 7 + ], + [ + 7, + 9 + ], + [ + 4, + 9 + ] + ] + }, + { + "polygon": [ + [ + 4, + 8 + ], + [ + 4, + 6 + ], + [ + 6, + 8 + ] + ] + } + ], + "meta": { + "seed": 4206046, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.256809, + "contourComplexity": 78, + "connectedComponents": 2, + "fillRatio": 0.119375, + "difficultyScore": 0.784013, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 421, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-420/target.png", + "shapes": { + "S1": "../images/voi-420/shape_S1.png", + "S2": "../images/voi-420/shape_S2.png", + "S3": "../images/voi-420/shape_S3.png", + "S4": "../images/voi-420/shape_S4.png", + "S5": "../images/voi-420/shape_S5.png", + "S6": "../images/voi-420/shape_S6.png" + } + }, + "ID": "voi-420", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 0, + "vertex": "V1", + "grid": [ + 0, + 7 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V4", + "grid": [ + 3, + 5 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V4", + "grid": [ + 4, + 9 + ] + }, + { + "shape": "S6", + "angle": 90, + "vertex": "V2", + "grid": [ + 4, + 6 + ] + } + ] + }, + "legacy_answer": "S2 0 V1 [0,7]\nS4 270 V4 [3,5]\nS5 0 V4 [4,9]\nS6 90 V2 [4,6]", + "solutionText": "S2 0 V1 [0,7]\nS4 270 V4 [3,5]\nS5 0 V4 [4,9]\nS6 90 V2 [4,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-420\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n- S2: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[0,1]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S6: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-421.json b/voi/data/voi-421.json new file mode 100644 index 0000000000000000000000000000000000000000..cf057d954cf031a3e5c783c1f6095e4e3d741b08 --- /dev/null +++ b/voi/data/voi-421.json @@ -0,0 +1,261 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 9 + ], + [ + 5, + 7 + ], + [ + 7, + 7 + ], + [ + 7, + 9 + ] + ] + }, + { + "polygon": [ + [ + 8, + 5 + ], + [ + 8, + 7 + ], + [ + 6, + 7 + ], + [ + 6, + 5 + ] + ] + }, + { + "polygon": [ + [ + 7, + 6 + ], + [ + 8, + 6 + ], + [ + 8, + 9 + ], + [ + 7, + 9 + ] + ] + }, + { + "polygon": [ + [ + 3, + 8 + ], + [ + 6, + 8 + ], + [ + 6, + 9 + ], + [ + 3, + 9 + ] + ] + } + ], + "meta": { + "seed": 4206047, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "contourComplexity": 16, + "connectedComponents": 2, + "fillRatio": 0.1, + "difficultyScore": 0.707143, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 422, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-421/target.png", + "shapes": { + "S1": "../images/voi-421/shape_S1.png", + "S2": "../images/voi-421/shape_S2.png", + "S3": "../images/voi-421/shape_S3.png", + "S4": "../images/voi-421/shape_S4.png", + "S5": "../images/voi-421/shape_S5.png", + "S6": "../images/voi-421/shape_S6.png" + } + }, + "ID": "voi-421", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 90, + "vertex": "V4", + "grid": [ + 7, + 9 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V1", + "grid": [ + 8, + 5 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V1", + "grid": [ + 7, + 6 + ] + }, + { + "shape": "S6", + "angle": 0, + "vertex": "V2", + "grid": [ + 6, + 8 + ] + } + ] + }, + "legacy_answer": "S2 90 V4 [7,9]\nS4 270 V1 [8,5]\nS5 0 V1 [7,6]\nS6 0 V2 [6,8]", + "solutionText": "S2 90 V4 [7,9]\nS4 270 V1 [8,5]\nS5 0 V1 [7,6]\nS6 0 V2 [6,8]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-421\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S5: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S6: V1=[0,0], V2=[3,0], V3=[3,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-422.json b/voi/data/voi-422.json new file mode 100644 index 0000000000000000000000000000000000000000..5f6c8dc18e5e43239afeb78e88660fdd9bad6436 --- /dev/null +++ b/voi/data/voi-422.json @@ -0,0 +1,269 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 10, + 3 + ], + [ + 9, + 3 + ], + [ + 9, + 0 + ], + [ + 10, + 0 + ] + ] + }, + { + "polygon": [ + [ + 5, + 1 + ], + [ + 8, + 1 + ], + [ + 8, + 3 + ], + [ + 5, + 3 + ] + ] + }, + { + "polygon": [ + [ + 9, + 0 + ], + [ + 9, + 2 + ], + [ + 7, + 2 + ], + [ + 7, + 0 + ] + ] + }, + { + "polygon": [ + [ + 9, + 3 + ], + [ + 6, + 3 + ], + [ + 7, + 2 + ], + [ + 9, + 2 + ] + ] + } + ], + "meta": { + "seed": 4206048, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.325956, + "contourComplexity": 42, + "connectedComponents": 2, + "fillRatio": 0.104688, + "difficultyScore": 0.744448, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 423, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-422/target.png", + "shapes": { + "S1": "../images/voi-422/shape_S1.png", + "S2": "../images/voi-422/shape_S2.png", + "S3": "../images/voi-422/shape_S3.png", + "S4": "../images/voi-422/shape_S4.png", + "S5": "../images/voi-422/shape_S5.png", + "S6": "../images/voi-422/shape_S6.png" + } + }, + "ID": "voi-422", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V3", + "grid": [ + 9, + 0 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V2", + "grid": [ + 8, + 1 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V2", + "grid": [ + 9, + 2 + ] + }, + { + "shape": "S6", + "angle": 180, + "vertex": "V3", + "grid": [ + 7, + 2 + ] + } + ] + }, + "legacy_answer": "S1 180 V3 [9,0]\nS3 0 V2 [8,1]\nS4 270 V2 [9,2]\nS6 180 V3 [7,2]", + "solutionText": "S1 180 V3 [9,0]\nS3 0 V2 [8,1]\nS4 270 V2 [9,2]\nS6 180 V3 [7,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-422\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S2: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S5: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S6: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-423.json b/voi/data/voi-423.json new file mode 100644 index 0000000000000000000000000000000000000000..9e9f80b5355e3be32850c8d3e7e6194d7c265c5b --- /dev/null +++ b/voi/data/voi-423.json @@ -0,0 +1,285 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 0 + ], + [ + 2, + 1 + ], + [ + 0, + 1 + ], + [ + 0, + 0 + ] + ] + }, + { + "polygon": [ + [ + 6, + 3 + ], + [ + 4, + 3 + ], + [ + 6, + 1 + ] + ] + }, + { + "polygon": [ + [ + 3, + 2 + ], + [ + 0, + 2 + ], + [ + 0, + 0 + ], + [ + 3, + 0 + ] + ] + }, + { + "polygon": [ + [ + 6, + 6 + ], + [ + 4, + 6 + ], + [ + 4, + 5 + ], + [ + 5, + 5 + ], + [ + 5, + 3 + ], + [ + 6, + 3 + ] + ] + } + ], + "meta": { + "seed": 4206049, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.284444, + "contourComplexity": 76, + "connectedComponents": 2, + "fillRatio": 0.100625, + "difficultyScore": 0.710972, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 424, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-423/target.png", + "shapes": { + "S1": "../images/voi-423/shape_S1.png", + "S2": "../images/voi-423/shape_S2.png", + "S3": "../images/voi-423/shape_S3.png", + "S4": "../images/voi-423/shape_S4.png", + "S5": "../images/voi-423/shape_S5.png", + "S6": "../images/voi-423/shape_S6.png" + } + }, + "ID": "voi-423", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V4", + "grid": [ + 0, + 0 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V1", + "grid": [ + 6, + 3 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V3", + "grid": [ + 0, + 0 + ] + }, + { + "shape": "S5", + "angle": 180, + "vertex": "V4", + "grid": [ + 5, + 5 + ] + } + ] + }, + "legacy_answer": "S1 270 V4 [0,0]\nS2 180 V1 [6,3]\nS4 180 V3 [0,0]\nS5 180 V4 [5,5]", + "solutionText": "S1 270 V4 [0,0]\nS2 180 V1 [6,3]\nS4 180 V3 [0,0]\nS5 180 V4 [5,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-423\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S6: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-424.json b/voi/data/voi-424.json new file mode 100644 index 0000000000000000000000000000000000000000..a8c1b33236250de3ebfaf0c4fa3d15c644d2038f --- /dev/null +++ b/voi/data/voi-424.json @@ -0,0 +1,285 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 8 + ], + [ + 0, + 8 + ], + [ + 2, + 6 + ] + ] + }, + { + "polygon": [ + [ + 3, + 7 + ], + [ + 3, + 10 + ], + [ + 2, + 9 + ], + [ + 2, + 7 + ] + ] + }, + { + "polygon": [ + [ + 3, + 6 + ], + [ + 3, + 4 + ], + [ + 4, + 4 + ], + [ + 4, + 5 + ], + [ + 6, + 5 + ], + [ + 6, + 6 + ] + ] + }, + { + "polygon": [ + [ + 7, + 6 + ], + [ + 4, + 6 + ], + [ + 4, + 4 + ], + [ + 7, + 4 + ] + ] + } + ], + "meta": { + "seed": 4206050, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.27409, + "contourComplexity": 108, + "connectedComponents": 2, + "fillRatio": 0.105938, + "difficultyScore": 0.741765, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 425, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-424/target.png", + "shapes": { + "S1": "../images/voi-424/shape_S1.png", + "S2": "../images/voi-424/shape_S2.png", + "S3": "../images/voi-424/shape_S3.png", + "S4": "../images/voi-424/shape_S4.png", + "S5": "../images/voi-424/shape_S5.png", + "S6": "../images/voi-424/shape_S6.png" + } + }, + "ID": "voi-424", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 180, + "vertex": "V1", + "grid": [ + 2, + 8 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V2", + "grid": [ + 3, + 10 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V4", + "grid": [ + 4, + 5 + ] + }, + { + "shape": "S6", + "angle": 180, + "vertex": "V1", + "grid": [ + 7, + 6 + ] + } + ] + }, + "legacy_answer": "S2 180 V1 [2,8]\nS4 270 V2 [3,10]\nS5 90 V4 [4,5]\nS6 180 V1 [7,6]", + "solutionText": "S2 180 V1 [2,8]\nS4 270 V2 [3,10]\nS5 90 V4 [4,5]\nS6 180 V1 [7,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-424\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S4: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S6: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-425.json b/voi/data/voi-425.json new file mode 100644 index 0000000000000000000000000000000000000000..a1ed6f2b64f448b0b775440289d0bfa6329795a4 --- /dev/null +++ b/voi/data/voi-425.json @@ -0,0 +1,269 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 9, + 1 + ], + [ + 10, + 1 + ], + [ + 10, + 3 + ], + [ + 9, + 3 + ] + ] + }, + { + "polygon": [ + [ + 6, + 4 + ], + [ + 7, + 4 + ], + [ + 7, + 6 + ], + [ + 6, + 6 + ] + ] + }, + { + "polygon": [ + [ + 6, + 7 + ], + [ + 6, + 5 + ], + [ + 8, + 5 + ], + [ + 8, + 7 + ] + ] + }, + { + "polygon": [ + [ + 9, + 5 + ], + [ + 6, + 5 + ], + [ + 6, + 3 + ], + [ + 9, + 3 + ] + ] + } + ], + "meta": { + "seed": 4206051, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "contourComplexity": 14, + "connectedComponents": 2, + "fillRatio": 0.1, + "difficultyScore": 0.707143, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 426, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-425/target.png", + "shapes": { + "S1": "../images/voi-425/shape_S1.png", + "S2": "../images/voi-425/shape_S2.png", + "S3": "../images/voi-425/shape_S3.png", + "S4": "../images/voi-425/shape_S4.png", + "S5": "../images/voi-425/shape_S5.png", + "S6": "../images/voi-425/shape_S6.png" + } + }, + "ID": "voi-425", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V1", + "grid": [ + 9, + 1 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V2", + "grid": [ + 7, + 4 + ] + }, + { + "shape": "S5", + "angle": 90, + "vertex": "V2", + "grid": [ + 6, + 5 + ] + }, + { + "shape": "S6", + "angle": 180, + "vertex": "V1", + "grid": [ + 9, + 5 + ] + } + ] + }, + "legacy_answer": "S1 0 V1 [9,1]\nS4 0 V2 [7,4]\nS5 90 V2 [6,5]\nS6 180 V1 [9,5]", + "solutionText": "S1 0 V1 [9,1]\nS4 0 V2 [7,4]\nS5 90 V2 [6,5]\nS6 180 V1 [9,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-425\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S6: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-426.json b/voi/data/voi-426.json new file mode 100644 index 0000000000000000000000000000000000000000..2fe91697cbcbbea440f55b8a1bde405ed26005c5 --- /dev/null +++ b/voi/data/voi-426.json @@ -0,0 +1,269 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 6 + ], + [ + 1, + 6 + ], + [ + 1, + 3 + ], + [ + 2, + 3 + ] + ] + }, + { + "polygon": [ + [ + 6, + 5 + ], + [ + 6, + 7 + ], + [ + 5, + 7 + ], + [ + 5, + 5 + ] + ] + }, + { + "polygon": [ + [ + 0, + 4 + ], + [ + 1, + 4 + ], + [ + 1, + 7 + ], + [ + 0, + 7 + ] + ] + }, + { + "polygon": [ + [ + 7, + 5 + ], + [ + 7, + 8 + ], + [ + 5, + 8 + ], + [ + 5, + 5 + ] + ] + } + ], + "meta": { + "seed": 4206052, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "contourComplexity": 14, + "connectedComponents": 2, + "fillRatio": 0.1, + "difficultyScore": 0.707143, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 427, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-426/target.png", + "shapes": { + "S1": "../images/voi-426/shape_S1.png", + "S2": "../images/voi-426/shape_S2.png", + "S3": "../images/voi-426/shape_S3.png", + "S4": "../images/voi-426/shape_S4.png", + "S5": "../images/voi-426/shape_S5.png", + "S6": "../images/voi-426/shape_S6.png" + } + }, + "ID": "voi-426", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V1", + "grid": [ + 2, + 6 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V2", + "grid": [ + 6, + 7 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V3", + "grid": [ + 1, + 7 + ] + }, + { + "shape": "S6", + "angle": 270, + "vertex": "V1", + "grid": [ + 7, + 5 + ] + } + ] + }, + "legacy_answer": "S1 180 V1 [2,6]\nS2 270 V2 [6,7]\nS5 0 V3 [1,7]\nS6 270 V1 [7,5]", + "solutionText": "S1 180 V1 [2,6]\nS2 270 V2 [6,7]\nS5 0 V3 [1,7]\nS6 270 V1 [7,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-426\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S5: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n- S6: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-427.json b/voi/data/voi-427.json new file mode 100644 index 0000000000000000000000000000000000000000..779d70e92a69321f7ec7cb0615c923714fb034d6 --- /dev/null +++ b/voi/data/voi-427.json @@ -0,0 +1,297 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 1, + 1 + ], + "V5": [ + 1, + 3 + ], + "V6": [ + 0, + 3 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 3 + ], + [ + 4, + 3 + ], + [ + 4, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 6 + ], + [ + 2, + 6 + ] + ] + }, + { + "polygon": [ + [ + 10, + 6 + ], + [ + 8, + 6 + ], + [ + 8, + 5 + ], + [ + 9, + 5 + ], + [ + 9, + 3 + ], + [ + 10, + 3 + ] + ] + }, + { + "polygon": [ + [ + 9, + 2 + ], + [ + 9, + 5 + ], + [ + 7, + 5 + ], + [ + 7, + 2 + ] + ] + }, + { + "polygon": [ + [ + 8, + 2 + ], + [ + 8, + 4 + ], + [ + 7, + 4 + ], + [ + 7, + 2 + ] + ] + } + ], + "meta": { + "seed": 4206053, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.25, + "contourComplexity": 16, + "connectedComponents": 2, + "fillRatio": 0.12, + "difficultyScore": 0.81, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 428, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-427/target.png", + "shapes": { + "S1": "../images/voi-427/shape_S1.png", + "S2": "../images/voi-427/shape_S2.png", + "S3": "../images/voi-427/shape_S3.png", + "S4": "../images/voi-427/shape_S4.png", + "S5": "../images/voi-427/shape_S5.png", + "S6": "../images/voi-427/shape_S6.png" + } + }, + "ID": "voi-427", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V4", + "grid": [ + 3, + 4 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V1", + "grid": [ + 10, + 6 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V1", + "grid": [ + 9, + 2 + ] + }, + { + "shape": "S5", + "angle": 270, + "vertex": "V2", + "grid": [ + 8, + 4 + ] + } + ] + }, + "legacy_answer": "S1 0 V4 [3,4]\nS2 180 V1 [10,6]\nS3 270 V1 [9,2]\nS5 270 V2 [8,4]", + "solutionText": "S1 0 V4 [3,4]\nS2 180 V1 [10,6]\nS3 270 V1 [9,2]\nS5 270 V2 [8,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-427\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[1,1], V5=[1,3], V6=[0,3]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[0,1]\n- S5: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S6: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-428.json b/voi/data/voi-428.json new file mode 100644 index 0000000000000000000000000000000000000000..5b27bc73361e5261ba8f3ae1c986aeeab7e1c08e --- /dev/null +++ b/voi/data/voi-428.json @@ -0,0 +1,265 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 1 + ], + [ + 6, + 1 + ], + [ + 6, + 3 + ], + [ + 5, + 3 + ] + ] + }, + { + "polygon": [ + [ + 8, + 7 + ], + [ + 6, + 7 + ], + [ + 6, + 5 + ], + [ + 8, + 5 + ] + ] + }, + { + "polygon": [ + [ + 8, + 2 + ], + [ + 8, + 4 + ], + [ + 6, + 4 + ], + [ + 6, + 2 + ] + ] + }, + { + "polygon": [ + [ + 6, + 5 + ], + [ + 6, + 3 + ], + [ + 8, + 3 + ], + [ + 8, + 5 + ] + ] + } + ], + "meta": { + "seed": 4206054, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.285714, + "contourComplexity": 10, + "connectedComponents": 2, + "fillRatio": 0.1, + "difficultyScore": 0.707143, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 429, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-428/target.png", + "shapes": { + "S1": "../images/voi-428/shape_S1.png", + "S2": "../images/voi-428/shape_S2.png", + "S3": "../images/voi-428/shape_S3.png", + "S4": "../images/voi-428/shape_S4.png", + "S5": "../images/voi-428/shape_S5.png", + "S6": "../images/voi-428/shape_S6.png" + } + }, + "ID": "voi-428", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V2", + "grid": [ + 6, + 1 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V3", + "grid": [ + 6, + 5 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V1", + "grid": [ + 8, + 2 + ] + }, + { + "shape": "S6", + "angle": 90, + "vertex": "V4", + "grid": [ + 8, + 5 + ] + } + ] + }, + "legacy_answer": "S1 0 V2 [6,1]\nS2 180 V3 [6,5]\nS4 270 V1 [8,2]\nS6 90 V4 [8,5]", + "solutionText": "S1 0 V2 [6,1]\nS2 180 V3 [6,5]\nS4 270 V1 [8,2]\nS6 90 V4 [8,5]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-428\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S5: V1=[0,0], V2=[1,0], V3=[0,1]\n- S6: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-429.json b/voi/data/voi-429.json new file mode 100644 index 0000000000000000000000000000000000000000..67d7f31a5d8c80a6a76a6feceea888672106b3e6 --- /dev/null +++ b/voi/data/voi-429.json @@ -0,0 +1,257 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 3 + ], + "V4": [ + 0, + 3 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 7, + 8 + ], + [ + 4, + 8 + ], + [ + 4, + 6 + ], + [ + 7, + 6 + ] + ] + }, + { + "polygon": [ + [ + 5, + 8 + ], + [ + 2, + 8 + ], + [ + 2, + 6 + ], + [ + 5, + 6 + ] + ] + }, + { + "polygon": [ + [ + 5, + 9 + ], + [ + 4, + 9 + ], + [ + 4, + 7 + ], + [ + 5, + 7 + ] + ] + }, + { + "polygon": [ + [ + 2, + 10 + ], + [ + 0, + 10 + ], + [ + 2, + 8 + ] + ] + } + ], + "meta": { + "seed": 4206055, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.249027, + "contourComplexity": 78, + "connectedComponents": 2, + "fillRatio": 0.120625, + "difficultyScore": 0.812641, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 430, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-429/target.png", + "shapes": { + "S1": "../images/voi-429/shape_S1.png", + "S2": "../images/voi-429/shape_S2.png", + "S3": "../images/voi-429/shape_S3.png", + "S4": "../images/voi-429/shape_S4.png", + "S5": "../images/voi-429/shape_S5.png", + "S6": "../images/voi-429/shape_S6.png" + } + }, + "ID": "voi-429", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V4", + "grid": [ + 7, + 6 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V4", + "grid": [ + 5, + 6 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V1", + "grid": [ + 5, + 9 + ] + }, + { + "shape": "S5", + "angle": 180, + "vertex": "V3", + "grid": [ + 2, + 8 + ] + } + ] + }, + "legacy_answer": "S1 180 V4 [7,6]\nS2 180 V4 [5,6]\nS4 180 V1 [5,9]\nS5 180 V3 [2,8]", + "solutionText": "S1 180 V4 [7,6]\nS2 180 V4 [5,6]\nS4 180 V1 [5,9]\nS5 180 V3 [2,8]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-429\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S2: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S5: V1=[0,0], V2=[2,0], V3=[0,2]\n- S6: V1=[0,0], V2=[1,0], V3=[1,3], V4=[0,3]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-430.json b/voi/data/voi-430.json new file mode 100644 index 0000000000000000000000000000000000000000..ddf0d979c24fd1dd1ab03cebd53d447f9e49fff1 --- /dev/null +++ b/voi/data/voi-430.json @@ -0,0 +1,269 @@ +{ + "gridSize": 10, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S5": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S6": { + "V1": [ + 0, + 0 + ], + "V2": [ + 3, + 0 + ], + "V3": [ + 3, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 1 + ], + [ + 5, + 0 + ], + [ + 7, + 0 + ], + [ + 7, + 1 + ] + ] + }, + { + "polygon": [ + [ + 8, + 2 + ], + [ + 5, + 2 + ], + [ + 5, + 0 + ], + [ + 8, + 0 + ] + ] + }, + { + "polygon": [ + [ + 3, + 2 + ], + [ + 4, + 2 + ], + [ + 4, + 3 + ], + [ + 3, + 3 + ] + ] + }, + { + "polygon": [ + [ + 9, + 4 + ], + [ + 6, + 4 + ], + [ + 6, + 2 + ], + [ + 9, + 2 + ] + ] + } + ], + "meta": { + "seed": 4206056, + "requiredShapeCount": 4, + "distractorShapeCount": 2, + "shapePoolComplexity": "medium", + "overlapAllowed": true, + "overlapRatio": 0.266667, + "contourComplexity": 14, + "connectedComponents": 2, + "fillRatio": 0.11, + "difficultyScore": 0.763333, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 431, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-430/target.png", + "shapes": { + "S1": "../images/voi-430/shape_S1.png", + "S2": "../images/voi-430/shape_S2.png", + "S3": "../images/voi-430/shape_S3.png", + "S4": "../images/voi-430/shape_S4.png", + "S5": "../images/voi-430/shape_S5.png", + "S6": "../images/voi-430/shape_S6.png" + } + }, + "ID": "voi-430", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 90, + "vertex": "V2", + "grid": [ + 5, + 0 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V4", + "grid": [ + 8, + 0 + ] + }, + { + "shape": "S5", + "angle": 0, + "vertex": "V3", + "grid": [ + 4, + 3 + ] + }, + { + "shape": "S6", + "angle": 180, + "vertex": "V1", + "grid": [ + 9, + 4 + ] + } + ] + }, + "legacy_answer": "S2 90 V2 [5,0]\nS3 180 V4 [8,0]\nS5 0 V3 [4,3]\nS6 180 V1 [9,4]", + "solutionText": "S2 90 V2 [5,0]\nS3 180 V4 [8,0]\nS5 0 V3 [4,3]\nS6 180 V1 [9,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-430\n- grid_size: 10x10\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 4\n- distractor_shapes: 2\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[3,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S3: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S4: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n- S5: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S6: V1=[0,0], V2=[3,0], V3=[3,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-531.json b/voi/data/voi-531.json new file mode 100644 index 0000000000000000000000000000000000000000..b0ca233344099b50b2bf97cdef132cfd3a854987 --- /dev/null +++ b/voi/data/voi-531.json @@ -0,0 +1,194 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 4 + ], + [ + 4, + 4 + ], + [ + 4, + 6 + ], + [ + 3, + 6 + ] + ] + }, + { + "polygon": [ + [ + 6, + 4 + ], + [ + 4, + 4 + ], + [ + 4, + 2 + ], + [ + 6, + 2 + ] + ] + }, + { + "polygon": [ + [ + 5, + 6 + ], + [ + 3, + 6 + ], + [ + 5, + 4 + ] + ] + } + ], + "meta": { + "seed": 4702010, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.131783, + "contourComplexity": 73, + "connectedComponents": 1, + "fillRatio": 0.194444, + "difficultyScore": 0.443979, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 532, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-531/target.png", + "shapes": { + "S1": "../images/voi-531/shape_S1.png", + "S2": "../images/voi-531/shape_S2.png", + "S3": "../images/voi-531/shape_S3.png", + "S4": "../images/voi-531/shape_S4.png" + } + }, + "ID": "voi-531", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V4", + "grid": [ + 3, + 6 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V2", + "grid": [ + 4, + 4 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V1", + "grid": [ + 5, + 6 + ] + } + ] + }, + "legacy_answer": "S1 0 V4 [3,6]\nS2 180 V2 [4,4]\nS4 180 V1 [5,6]", + "solutionText": "S1 0 V4 [3,6]\nS2 180 V2 [4,4]\nS4 180 V1 [5,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-531\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-532.json b/voi/data/voi-532.json new file mode 100644 index 0000000000000000000000000000000000000000..102fdbf0ad4ecdf53a1b2fb2d41ed5e375f3c23a --- /dev/null +++ b/voi/data/voi-532.json @@ -0,0 +1,186 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 3 + ], + [ + 4, + 3 + ], + [ + 5, + 2 + ] + ] + }, + { + "polygon": [ + [ + 5, + 0 + ], + [ + 5, + 1 + ], + [ + 4, + 0 + ] + ] + }, + { + "polygon": [ + [ + 4, + 1 + ], + [ + 6, + 1 + ], + [ + 6, + 3 + ], + [ + 4, + 3 + ] + ] + } + ], + "meta": { + "seed": 4702011, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.209877, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.111111, + "difficultyScore": 0.457284, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 533, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-532/target.png", + "shapes": { + "S1": "../images/voi-532/shape_S1.png", + "S2": "../images/voi-532/shape_S2.png", + "S3": "../images/voi-532/shape_S3.png", + "S4": "../images/voi-532/shape_S4.png" + } + }, + "ID": "voi-532", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V1", + "grid": [ + 5, + 3 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V3", + "grid": [ + 4, + 0 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V4", + "grid": [ + 4, + 3 + ] + } + ] + }, + "legacy_answer": "S1 180 V1 [5,3]\nS2 270 V3 [4,0]\nS4 0 V4 [4,3]", + "solutionText": "S1 180 V1 [5,3]\nS2 270 V3 [4,0]\nS4 0 V4 [4,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-532\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[0,1]\n- S2: V1=[0,0], V2=[1,0], V3=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-533.json b/voi/data/voi-533.json new file mode 100644 index 0000000000000000000000000000000000000000..4241d78c9eac0f749aeaa239a343d62d9df7f106 --- /dev/null +++ b/voi/data/voi-533.json @@ -0,0 +1,194 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 1, + 3 + ], + [ + 1, + 1 + ], + [ + 2, + 1 + ], + [ + 2, + 3 + ] + ] + }, + { + "polygon": [ + [ + 2, + 3 + ], + [ + 2, + 5 + ], + [ + 0, + 5 + ], + [ + 0, + 3 + ] + ] + }, + { + "polygon": [ + [ + 2, + 4 + ], + [ + 2, + 5 + ], + [ + 1, + 4 + ] + ] + } + ], + "meta": { + "seed": 4702012, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.162679, + "contourComplexity": 38, + "connectedComponents": 1, + "fillRatio": 0.15191, + "difficultyScore": 0.405463, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 534, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-533/target.png", + "shapes": { + "S1": "../images/voi-533/shape_S1.png", + "S2": "../images/voi-533/shape_S2.png", + "S3": "../images/voi-533/shape_S3.png", + "S4": "../images/voi-533/shape_S4.png" + } + }, + "ID": "voi-533", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 90, + "vertex": "V4", + "grid": [ + 2, + 3 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V2", + "grid": [ + 2, + 5 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V1", + "grid": [ + 2, + 4 + ] + } + ] + }, + "legacy_answer": "S2 90 V4 [2,3]\nS3 270 V2 [2,5]\nS4 270 V1 [2,4]", + "solutionText": "S2 90 V4 [2,3]\nS3 270 V2 [2,5]\nS4 270 V1 [2,4]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-533\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-534.json b/voi/data/voi-534.json new file mode 100644 index 0000000000000000000000000000000000000000..8addea5ebd6e96af05d496745aac29fe5fcb9bc9 --- /dev/null +++ b/voi/data/voi-534.json @@ -0,0 +1,202 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 1, + 2 + ], + [ + 3, + 2 + ], + [ + 3, + 4 + ], + [ + 1, + 4 + ] + ] + }, + { + "polygon": [ + [ + 1, + 0 + ], + [ + 3, + 0 + ], + [ + 3, + 2 + ], + [ + 1, + 2 + ] + ] + }, + { + "polygon": [ + [ + 2, + 2 + ], + [ + 2, + 1 + ], + [ + 3, + 1 + ], + [ + 3, + 2 + ] + ] + } + ], + "meta": { + "seed": 4702013, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "contourComplexity": 8, + "connectedComponents": 1, + "fillRatio": 0.194444, + "difficultyScore": 0.34, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 535, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-534/target.png", + "shapes": { + "S1": "../images/voi-534/shape_S1.png", + "S2": "../images/voi-534/shape_S2.png", + "S3": "../images/voi-534/shape_S3.png", + "S4": "../images/voi-534/shape_S4.png" + } + }, + "ID": "voi-534", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V1", + "grid": [ + 1, + 2 + ] + }, + { + "shape": "S3", + "angle": 0, + "vertex": "V3", + "grid": [ + 3, + 2 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V2", + "grid": [ + 2, + 1 + ] + } + ] + }, + "legacy_answer": "S1 0 V1 [1,2]\nS3 0 V3 [3,2]\nS4 90 V2 [2,1]", + "solutionText": "S1 0 V1 [1,2]\nS3 0 V3 [3,2]\nS4 90 V2 [2,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-534\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-535.json b/voi/data/voi-535.json new file mode 100644 index 0000000000000000000000000000000000000000..ce88fc0b5219324808c98d361eeb8a374bfaf8da --- /dev/null +++ b/voi/data/voi-535.json @@ -0,0 +1,202 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 4 + ], + [ + 2, + 2 + ], + [ + 4, + 2 + ], + [ + 4, + 4 + ] + ] + }, + { + "polygon": [ + [ + 2, + 1 + ], + [ + 2, + 3 + ], + [ + 0, + 3 + ], + [ + 0, + 1 + ] + ] + }, + { + "polygon": [ + [ + 0, + 2 + ], + [ + 0, + 1 + ], + [ + 1, + 1 + ], + [ + 1, + 2 + ] + ] + } + ], + "meta": { + "seed": 4702014, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "contourComplexity": 10, + "connectedComponents": 1, + "fillRatio": 0.194444, + "difficultyScore": 0.34, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 536, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-535/target.png", + "shapes": { + "S1": "../images/voi-535/shape_S1.png", + "S2": "../images/voi-535/shape_S2.png", + "S3": "../images/voi-535/shape_S3.png", + "S4": "../images/voi-535/shape_S4.png" + } + }, + "ID": "voi-535", + "answer": { + "placements": [ + { + "shape": "S2", + "angle": 90, + "vertex": "V1", + "grid": [ + 2, + 4 + ] + }, + { + "shape": "S3", + "angle": 270, + "vertex": "V2", + "grid": [ + 2, + 3 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V2", + "grid": [ + 0, + 1 + ] + } + ] + }, + "legacy_answer": "S2 90 V1 [2,4]\nS3 270 V2 [2,3]\nS4 90 V2 [0,1]", + "solutionText": "S2 90 V1 [2,4]\nS3 270 V2 [2,3]\nS4 90 V2 [0,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-535\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-536.json b/voi/data/voi-536.json new file mode 100644 index 0000000000000000000000000000000000000000..a2b305485c8deca5a7569eb39a2b151e79110408 --- /dev/null +++ b/voi/data/voi-536.json @@ -0,0 +1,194 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 4, + 2 + ], + [ + 4, + 4 + ], + [ + 3, + 4 + ], + [ + 3, + 2 + ] + ] + }, + { + "polygon": [ + [ + 0, + 3 + ], + [ + 2, + 3 + ], + [ + 2, + 4 + ], + [ + 0, + 4 + ] + ] + }, + { + "polygon": [ + [ + 2, + 2 + ], + [ + 4, + 2 + ], + [ + 2, + 4 + ] + ] + } + ], + "meta": { + "seed": 4702015, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 70, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.381191, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 537, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-536/target.png", + "shapes": { + "S1": "../images/voi-536/shape_S1.png", + "S2": "../images/voi-536/shape_S2.png", + "S3": "../images/voi-536/shape_S3.png", + "S4": "../images/voi-536/shape_S4.png" + } + }, + "ID": "voi-536", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V2", + "grid": [ + 4, + 4 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V4", + "grid": [ + 0, + 4 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V1", + "grid": [ + 2, + 2 + ] + } + ] + }, + "legacy_answer": "S1 270 V2 [4,4]\nS2 0 V4 [0,4]\nS4 0 V1 [2,2]", + "solutionText": "S1 270 V2 [4,4]\nS2 0 V4 [0,4]\nS4 0 V1 [2,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-536\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-537.json b/voi/data/voi-537.json new file mode 100644 index 0000000000000000000000000000000000000000..39e17d3c78e8ce4531a1439116e009e9ea24144f --- /dev/null +++ b/voi/data/voi-537.json @@ -0,0 +1,202 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 4 + ], + [ + 3, + 2 + ], + [ + 5, + 2 + ], + [ + 5, + 4 + ] + ] + }, + { + "polygon": [ + [ + 5, + 6 + ], + [ + 3, + 6 + ], + [ + 3, + 4 + ], + [ + 5, + 4 + ] + ] + }, + { + "polygon": [ + [ + 4, + 3 + ], + [ + 3, + 3 + ], + [ + 3, + 2 + ], + [ + 4, + 2 + ] + ] + } + ], + "meta": { + "seed": 4702016, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "contourComplexity": 6, + "connectedComponents": 1, + "fillRatio": 0.194444, + "difficultyScore": 0.34, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 538, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-537/target.png", + "shapes": { + "S1": "../images/voi-537/shape_S1.png", + "S2": "../images/voi-537/shape_S2.png", + "S3": "../images/voi-537/shape_S3.png", + "S4": "../images/voi-537/shape_S4.png" + } + }, + "ID": "voi-537", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V2", + "grid": [ + 3, + 2 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V2", + "grid": [ + 3, + 6 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V1", + "grid": [ + 4, + 3 + ] + } + ] + }, + "legacy_answer": "S1 90 V2 [3,2]\nS3 180 V2 [3,6]\nS4 180 V1 [4,3]", + "solutionText": "S1 90 V2 [3,2]\nS3 180 V2 [3,6]\nS4 180 V1 [4,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-537\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-538.json b/voi/data/voi-538.json new file mode 100644 index 0000000000000000000000000000000000000000..239b494fb5ef440ca7249acaa63d4e4a5458b2fd --- /dev/null +++ b/voi/data/voi-538.json @@ -0,0 +1,194 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 0, + 2 + ], + [ + 0, + 0 + ], + [ + 1, + 0 + ], + [ + 1, + 2 + ] + ] + }, + { + "polygon": [ + [ + 3, + 2 + ], + [ + 1, + 2 + ], + [ + 1, + 0 + ], + [ + 3, + 0 + ] + ] + }, + { + "polygon": [ + [ + 0, + 0 + ], + [ + 1, + 0 + ], + [ + 0, + 1 + ] + ] + } + ], + "meta": { + "seed": 4702017, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.162679, + "contourComplexity": 36, + "connectedComponents": 1, + "fillRatio": 0.15191, + "difficultyScore": 0.405463, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 539, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-538/target.png", + "shapes": { + "S1": "../images/voi-538/shape_S1.png", + "S2": "../images/voi-538/shape_S2.png", + "S3": "../images/voi-538/shape_S3.png", + "S4": "../images/voi-538/shape_S4.png" + } + }, + "ID": "voi-538", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 90, + "vertex": "V1", + "grid": [ + 0, + 2 + ] + }, + { + "shape": "S2", + "angle": 180, + "vertex": "V4", + "grid": [ + 3, + 0 + ] + }, + { + "shape": "S4", + "angle": 0, + "vertex": "V3", + "grid": [ + 0, + 1 + ] + } + ] + }, + "legacy_answer": "S1 90 V1 [0,2]\nS2 180 V4 [3,0]\nS4 0 V3 [0,1]", + "solutionText": "S1 90 V1 [0,2]\nS2 180 V4 [3,0]\nS4 0 V3 [0,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-538\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-539.json b/voi/data/voi-539.json new file mode 100644 index 0000000000000000000000000000000000000000..5bf3e68cc2341a56eeb265aa10ab023ab53f65d8 --- /dev/null +++ b/voi/data/voi-539.json @@ -0,0 +1,174 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 5, + 5 + ], + [ + 3, + 5 + ], + [ + 5, + 3 + ] + ] + }, + { + "polygon": [ + [ + 3, + 4 + ], + [ + 3, + 6 + ], + [ + 1, + 4 + ] + ] + }, + { + "polygon": [ + [ + 5, + 6 + ], + [ + 3, + 6 + ], + [ + 5, + 4 + ] + ] + } + ], + "meta": { + "seed": 4702018, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.171717, + "contourComplexity": 197, + "connectedComponents": 1, + "fillRatio": 0.142361, + "difficultyScore": 0.388409, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 540, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-539/target.png", + "shapes": { + "S1": "../images/voi-539/shape_S1.png", + "S2": "../images/voi-539/shape_S2.png", + "S3": "../images/voi-539/shape_S3.png", + "S4": "../images/voi-539/shape_S4.png" + } + }, + "ID": "voi-539", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V3", + "grid": [ + 5, + 3 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V2", + "grid": [ + 3, + 6 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V2", + "grid": [ + 3, + 6 + ] + } + ] + }, + "legacy_answer": "S1 180 V3 [5,3]\nS2 270 V2 [3,6]\nS4 180 V2 [3,6]", + "solutionText": "S1 180 V3 [5,3]\nS2 270 V2 [3,6]\nS4 180 V2 [3,6]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-539\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[1,0], V3=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-540.json b/voi/data/voi-540.json new file mode 100644 index 0000000000000000000000000000000000000000..6dbdb8c7a94342532e8684b8dd6aa4c6949d617d --- /dev/null +++ b/voi/data/voi-540.json @@ -0,0 +1,194 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 0, + 1 + ], + [ + 2, + 1 + ], + [ + 0, + 3 + ] + ] + }, + { + "polygon": [ + [ + 3, + 4 + ], + [ + 3, + 2 + ], + [ + 4, + 2 + ], + [ + 4, + 4 + ] + ] + }, + { + "polygon": [ + [ + 3, + 3 + ], + [ + 1, + 3 + ], + [ + 1, + 1 + ], + [ + 3, + 1 + ] + ] + } + ], + "meta": { + "seed": 4702019, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.131783, + "contourComplexity": 74, + "connectedComponents": 1, + "fillRatio": 0.194444, + "difficultyScore": 0.443979, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 541, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-540/target.png", + "shapes": { + "S1": "../images/voi-540/shape_S1.png", + "S2": "../images/voi-540/shape_S2.png", + "S3": "../images/voi-540/shape_S3.png", + "S4": "../images/voi-540/shape_S4.png" + } + }, + "ID": "voi-540", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V2", + "grid": [ + 2, + 1 + ] + }, + { + "shape": "S3", + "angle": 90, + "vertex": "V3", + "grid": [ + 4, + 2 + ] + }, + { + "shape": "S4", + "angle": 180, + "vertex": "V4", + "grid": [ + 3, + 1 + ] + } + ] + }, + "legacy_answer": "S1 0 V2 [2,1]\nS3 90 V3 [4,2]\nS4 180 V4 [3,1]", + "solutionText": "S1 0 V2 [2,1]\nS3 90 V3 [4,2]\nS4 180 V4 [3,1]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-540\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-541.json b/voi/data/voi-541.json new file mode 100644 index 0000000000000000000000000000000000000000..36f7adc18c775758cbee8ff10118a4fe5e3120dd --- /dev/null +++ b/voi/data/voi-541.json @@ -0,0 +1,194 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 2 + ], + [ + 1, + 2 + ], + [ + 3, + 0 + ] + ] + }, + { + "polygon": [ + [ + 1, + 0 + ], + [ + 1, + 2 + ], + [ + 0, + 2 + ], + [ + 0, + 0 + ] + ] + }, + { + "polygon": [ + [ + 1, + 1 + ], + [ + 1, + 0 + ], + [ + 3, + 0 + ], + [ + 3, + 1 + ] + ] + } + ], + "meta": { + "seed": 4702020, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.175258, + "contourComplexity": 69, + "connectedComponents": 1, + "fillRatio": 0.138889, + "difficultyScore": 0.381191, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 542, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-541/target.png", + "shapes": { + "S1": "../images/voi-541/shape_S1.png", + "S2": "../images/voi-541/shape_S2.png", + "S3": "../images/voi-541/shape_S3.png", + "S4": "../images/voi-541/shape_S4.png" + } + }, + "ID": "voi-541", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 180, + "vertex": "V3", + "grid": [ + 3, + 0 + ] + }, + { + "shape": "S2", + "angle": 270, + "vertex": "V3", + "grid": [ + 0, + 2 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V3", + "grid": [ + 3, + 0 + ] + } + ] + }, + "legacy_answer": "S1 180 V3 [3,0]\nS2 270 V3 [0,2]\nS4 90 V3 [3,0]", + "solutionText": "S1 180 V3 [3,0]\nS2 270 V3 [0,2]\nS4 90 V3 [3,0]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-541\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S3: V1=[0,0], V2=[2,0], V3=[2,1], V4=[0,1]\n- S4: V1=[0,0], V2=[1,0], V3=[1,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-542.json b/voi/data/voi-542.json new file mode 100644 index 0000000000000000000000000000000000000000..97cc8bf81b82b1ea8ca0ceec25bc8638637aa631 --- /dev/null +++ b/voi/data/voi-542.json @@ -0,0 +1,182 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 0, + 1 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 3, + 3 + ], + [ + 3, + 5 + ], + [ + 1, + 3 + ] + ] + }, + { + "polygon": [ + [ + 3, + 3 + ], + [ + 5, + 3 + ], + [ + 5, + 5 + ], + [ + 3, + 5 + ] + ] + }, + { + "polygon": [ + [ + 2, + 3 + ], + [ + 2, + 4 + ], + [ + 1, + 3 + ] + ] + } + ], + "meta": { + "seed": 4702021, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.161137, + "contourComplexity": 34, + "connectedComponents": 1, + "fillRatio": 0.153646, + "difficultyScore": 0.408159, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 543, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-542/target.png", + "shapes": { + "S1": "../images/voi-542/shape_S1.png", + "S2": "../images/voi-542/shape_S2.png", + "S3": "../images/voi-542/shape_S3.png", + "S4": "../images/voi-542/shape_S4.png" + } + }, + "ID": "voi-542", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 270, + "vertex": "V3", + "grid": [ + 1, + 3 + ] + }, + { + "shape": "S2", + "angle": 0, + "vertex": "V2", + "grid": [ + 5, + 3 + ] + }, + { + "shape": "S4", + "angle": 270, + "vertex": "V3", + "grid": [ + 1, + 3 + ] + } + ] + }, + "legacy_answer": "S1 270 V3 [1,3]\nS2 0 V2 [5,3]\nS4 270 V3 [1,3]", + "solutionText": "S1 270 V3 [1,3]\nS2 0 V2 [5,3]\nS4 270 V3 [1,3]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-542\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[2,0], V3=[0,2]\n- S2: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[0,2]\n- S4: V1=[0,0], V2=[1,0], V3=[0,1]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +} diff --git a/voi/data/voi-543.json b/voi/data/voi-543.json new file mode 100644 index 0000000000000000000000000000000000000000..99c3f9681de9f939e65833c060f3dc4cd46768da --- /dev/null +++ b/voi/data/voi-543.json @@ -0,0 +1,198 @@ +{ + "gridSize": 6, + "inventory": { + "S1": { + "V1": [ + 0, + 0 + ], + "V2": [ + 1, + 0 + ], + "V3": [ + 1, + 1 + ], + "V4": [ + 0, + 1 + ] + }, + "S2": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 0, + 2 + ] + }, + "S3": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + }, + "S4": { + "V1": [ + 0, + 0 + ], + "V2": [ + 2, + 0 + ], + "V3": [ + 2, + 2 + ], + "V4": [ + 0, + 2 + ] + } + }, + "target": [ + { + "polygon": [ + [ + 2, + 1 + ], + [ + 3, + 1 + ], + [ + 3, + 2 + ], + [ + 2, + 2 + ] + ] + }, + { + "polygon": [ + [ + 2, + 3 + ], + [ + 0, + 3 + ], + [ + 0, + 1 + ], + [ + 2, + 1 + ] + ] + }, + { + "polygon": [ + [ + 1, + 4 + ], + [ + 1, + 2 + ], + [ + 3, + 2 + ], + [ + 3, + 4 + ] + ] + } + ], + "meta": { + "seed": 4702022, + "requiredShapeCount": 3, + "distractorShapeCount": 1, + "shapePoolComplexity": "low", + "overlapAllowed": true, + "overlapRatio": 0.222222, + "contourComplexity": 11, + "connectedComponents": 1, + "fillRatio": 0.194444, + "difficultyScore": 0.34, + "rasterScale": 16, + "targetPackaging": "solution_xor_components", + "catalogIndex": 544, + "strictValidation": true + }, + "imageAssets": { + "target": "../images/voi-543/target.png", + "shapes": { + "S1": "../images/voi-543/shape_S1.png", + "S2": "../images/voi-543/shape_S2.png", + "S3": "../images/voi-543/shape_S3.png", + "S4": "../images/voi-543/shape_S4.png" + } + }, + "ID": "voi-543", + "answer": { + "placements": [ + { + "shape": "S1", + "angle": 0, + "vertex": "V3", + "grid": [ + 3, + 2 + ] + }, + { + "shape": "S3", + "angle": 180, + "vertex": "V2", + "grid": [ + 0, + 3 + ] + }, + { + "shape": "S4", + "angle": 90, + "vertex": "V2", + "grid": [ + 1, + 2 + ] + } + ] + }, + "legacy_answer": "S1 0 V3 [3,2]\nS3 180 V2 [0,3]\nS4 90 V2 [1,2]", + "solutionText": "S1 0 V3 [3,2]\nS3 180 V2 [0,3]\nS4 90 V2 [1,2]", + "prompt": { + "system": "You are a Text-VOI spatial logic puzzle solver. Given a target pattern image and a set of base shapes, choose how to rotate and translate the shapes onto a grid so that their XOR-overlapping union matches the target pattern exactly.\n\nYou will receive: (a) one target pattern image showing the goal silhouette on a labeled grid, (b) one image per available base shape with vertex labels, and (c) a structured text body listing each shape's vertex coordinates, the grid size, the difficulty tier, the required and distractor shape counts, and the XOR-overlap rule.\n\nYou may reason step by step before the final answer. Place your final answer on the very last line of your reply, in the form: FINAL_JSON: \n\nThe JSON object must follow the placements schema described in section 8 of the user prompt. Do NOT wrap FINAL_JSON in Markdown code fences. Do NOT write anything after the FINAL_JSON line. Emit exactly one FINAL_JSON line.\n\nIf you cannot reconstruct the target pattern with full confidence, still emit a best-effort FINAL_JSON line with at least one placement; the only structurally invalid output is no FINAL_JSON line at all. Never refuse, never return prose only.", + "user": "## 1. TASK\nChoose how to rotate and translate base shapes onto the grid so that their XOR-overlapped union exactly reproduces the target pattern.\nThe puzzle is solved when the rasterized pixel mask of the chosen placements equals the target pattern's pixel mask.\n\n## 2. WORLD MODEL\n- Grid: an integer grid of size `gridSize x gridSize`. The grid coordinate origin is the bottom-left corner; x increases to the right, y increases upward.\n- Base shape: a polygon defined by a sequence of named vertices V1, V2, ... in the shape's local coordinate frame. The local origin is `[0, 0]`.\n- Vertex id: the literal vertex name (e.g. \"V1\", \"V2\", ...) used to anchor a placement.\n- Placement: pick one base shape, rotate it clockwise around its local origin by 0/90/180/270 degrees, then translate so a chosen post-rotation vertex lands on a chosen grid coordinate.\n- XOR overlap: when shapes overlap, the overlapping region is removed (symmetric difference of pixel masks). XOR overlap is allowed. Overlapping black areas cancel each other out.\n- Target pattern: the goal black region painted on the grid.\n\n## 3. VISUAL LEGEND\n- Image 1: the target pattern, drawn on the grid with coordinate labels visible.\n- Image 2..N: one image per base shape, with vertex labels \"V1, V2, ...\" printed at each vertex and the local origin marked.\n- All images share the same grid coordinate system (origin bottom-left, x right, y up).\n\n## 4. INPUT FIELDS\n- level_id: voi-543\n- grid_size: 6x6\n- difficulty_tier: Unlabeled\n- minimum_required_shapes: 3\n- distractor_shapes: 1\n- xor_overlap_allowed: True\n- inventory (each base shape's vertex coordinates):\n- S1: V1=[0,0], V2=[1,0], V3=[1,1], V4=[0,1]\n- S2: V1=[0,0], V2=[2,0], V3=[0,2]\n- S3: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n- S4: V1=[0,0], V2=[2,0], V3=[2,2], V4=[0,2]\n\n## 5. ACTION VOCABULARY\nA complete answer is one ordered list of `placement` objects:\n- placement: {\"shape\": , \"angle\": 0|90|180|270, \"vertex\": , \"grid\": [, ]}\n- `shape` is one of the inventory shape ids above.\n- `angle` is the clockwise rotation in degrees, applied around the shape's local origin before translation.\n- `vertex` is the post-rotation vertex of the chosen shape used as the placement anchor.\n- `grid` is the global grid coordinate where the chosen anchor vertex lands.\n\n## 6. CONSTRAINTS\n- Each shape may be used at most once (no shape appears twice in the placements list).\n- `angle` must be exactly one of {0, 90, 180, 270}.\n- `vertex` must be a valid vertex id of the chosen shape (e.g. \"V1\" .. \"Vk\").\n- `grid` coordinates may extend outside `[0, gridSize)` only if the resulting placement still fits the puzzle's framing — overshooting cells outside the target are scored as misses.\n- The final XOR-union of all placement pixel masks must equal the target pattern's pixel mask for a perfect score.\n\n## 7. SOLVING ADVICE\n- Identify large unique shapes in the target first; small shapes are usually used to fill remaining gaps.\n- When XOR overlap is allowed, two shapes overlapping each other can carve a hole — useful when the target has concavities the base shapes cannot reproduce alone.\n- Anchor each placement to a corner vertex (V1 typically) when possible; it makes the translation reasoning easier to verify.\n\n## 8. OUTPUT SCHEMA\nFINAL_JSON: {\"placements\":[{\"shape\":\"\",\"angle\":<0|90|180|270>,\"vertex\":\"\",\"grid\":[,]}, ...]}\n- placements: list of placement objects.\n- shape: string, must be a key from the inventory.\n- angle: integer in {0, 90, 180, 270}.\n- vertex: string, a valid vertex id of the chosen shape.\n- grid: array of two integers `[gridX, gridY]`.\n\n## 9. FINAL INSTRUCTION\nYou may include reasoning above, but the very last line of your reply must start with FINAL_JSON: followed by exactly one valid JSON object.\nDo not wrap FINAL_JSON in code fences and do not write anything after it." + } +}