{
  "schemaVersion": 1,
  "illustrationDate": "2026-10-01",
  "author": "Lumacta",
  "syntheticGeometry": true,
  "implementation": "Original dependency-free JavaScript geometry validator and finite-graph breadth-first search.",
  "scope": "Software illustration only. No MIT algorithm/model, flow-matching model, robot or benchmark was run.",
  "numericScope": "Closed axis-aligned rectangles and piecewise straight segments, using JavaScript finite-number arithmetic; no physical clearance or dynamics model.",
  "rules": [
    "Exact start and goal",
    "Finite 2D waypoints and finite route length",
    "Closed rectangular map bounds",
    "Obstacle boundary contact is invalid",
    "Every whole connecting segment is checked",
    "Length is secondary to validity",
    "No-path and shortest-route results are limited to the explicit finite four-neighbour unit grid"
  ],
  "cases": [
    {
      "id": "direct",
      "label": "1. Shortest proposal",
      "description": "The straight proposal is 8 units long, but crosses the closed obstacle. A short route is not automatically an acceptable route.",
      "map": {
        "id": "closed-box",
        "bounds": {
          "minX": 0,
          "maxX": 10,
          "minY": 0,
          "maxY": 10
        },
        "start": [
          1,
          5
        ],
        "goal": [
          9,
          5
        ],
        "obstacles": [
          {
            "id": "box",
            "minX": 4,
            "maxX": 6,
            "minY": 4,
            "maxY": 6
          }
        ]
      },
      "route": [
        [
          1,
          5
        ],
        [
          9,
          5
        ]
      ],
      "search": null,
      "validation": {
        "accepted": false,
        "length": 8,
        "waypointCount": 2,
        "segmentChecks": [
          {
            "index": 0,
            "from": [
              1,
              5
            ],
            "to": [
              9,
              5
            ],
            "evaluable": true,
            "clear": false,
            "collisions": [
              "box"
            ]
          }
        ],
        "checks": [
          {
            "id": "finite",
            "label": "Finite input; at least two waypoints",
            "passed": true,
            "detail": "2 waypoints; coordinates must be finite numbers."
          },
          {
            "id": "endpoints",
            "label": "Exact start and goal",
            "passed": true,
            "detail": "Start (1, 5); goal (9, 5)."
          },
          {
            "id": "bounds",
            "label": "Entire route inside map",
            "passed": true,
            "detail": "All waypoints must lie inside the bounds. Straight segments between them stay inside the rectangular map."
          },
          {
            "id": "waypoints",
            "label": "Waypoints clear of closed obstacles",
            "passed": true,
            "detail": "Obstacle interiors and boundaries both reject a point."
          },
          {
            "id": "segments",
            "label": "Every connecting segment clear",
            "passed": false,
            "detail": "1 whole segment checked, including boundary contact and repeated points."
          },
          {
            "id": "length",
            "label": "Finite measured length",
            "passed": true,
            "detail": "Length is a secondary measurement; it never cancels a failed constraint."
          }
        ],
        "errors": [
          {
            "code": "segment-obstacle",
            "segment": 0,
            "obstacle": "box",
            "message": "Segment 1 touches or crosses obstacle box."
          }
        ]
      },
      "outcome": "rejected"
    },
    {
      "id": "detour",
      "label": "2. Accepted detour",
      "description": "This longer, manually specified candidate clears the obstacle. Acceptance establishes validity against these rules; it does not establish a globally shortest route.",
      "map": {
        "id": "closed-box",
        "bounds": {
          "minX": 0,
          "maxX": 10,
          "minY": 0,
          "maxY": 10
        },
        "start": [
          1,
          5
        ],
        "goal": [
          9,
          5
        ],
        "obstacles": [
          {
            "id": "box",
            "minX": 4,
            "maxX": 6,
            "minY": 4,
            "maxY": 6
          }
        ]
      },
      "route": [
        [
          1,
          5
        ],
        [
          3.5,
          6.5
        ],
        [
          6.5,
          6.5
        ],
        [
          9,
          5
        ]
      ],
      "search": null,
      "validation": {
        "accepted": true,
        "length": 8.830951894845299,
        "waypointCount": 4,
        "segmentChecks": [
          {
            "index": 0,
            "from": [
              1,
              5
            ],
            "to": [
              3.5,
              6.5
            ],
            "evaluable": true,
            "clear": true,
            "collisions": []
          },
          {
            "index": 1,
            "from": [
              3.5,
              6.5
            ],
            "to": [
              6.5,
              6.5
            ],
            "evaluable": true,
            "clear": true,
            "collisions": []
          },
          {
            "index": 2,
            "from": [
              6.5,
              6.5
            ],
            "to": [
              9,
              5
            ],
            "evaluable": true,
            "clear": true,
            "collisions": []
          }
        ],
        "checks": [
          {
            "id": "finite",
            "label": "Finite input; at least two waypoints",
            "passed": true,
            "detail": "4 waypoints; coordinates must be finite numbers."
          },
          {
            "id": "endpoints",
            "label": "Exact start and goal",
            "passed": true,
            "detail": "Start (1, 5); goal (9, 5)."
          },
          {
            "id": "bounds",
            "label": "Entire route inside map",
            "passed": true,
            "detail": "All waypoints must lie inside the bounds. Straight segments between them stay inside the rectangular map."
          },
          {
            "id": "waypoints",
            "label": "Waypoints clear of closed obstacles",
            "passed": true,
            "detail": "Obstacle interiors and boundaries both reject a point."
          },
          {
            "id": "segments",
            "label": "Every connecting segment clear",
            "passed": true,
            "detail": "3 whole segments checked, including boundary contact and repeated points."
          },
          {
            "id": "length",
            "label": "Finite measured length",
            "passed": true,
            "detail": "Length is a secondary measurement; it never cancels a failed constraint."
          }
        ],
        "errors": []
      },
      "outcome": "accepted"
    },
    {
      "id": "waypoint-trap",
      "label": "3. Waypoint trap",
      "description": "All four waypoints are outside the obstacle. The segment joining (3, 3) to (7, 7) crosses it, so waypoint-only checking would miss a failure.",
      "map": {
        "id": "closed-box",
        "bounds": {
          "minX": 0,
          "maxX": 10,
          "minY": 0,
          "maxY": 10
        },
        "start": [
          1,
          5
        ],
        "goal": [
          9,
          5
        ],
        "obstacles": [
          {
            "id": "box",
            "minX": 4,
            "maxX": 6,
            "minY": 4,
            "maxY": 6
          }
        ]
      },
      "route": [
        [
          1,
          5
        ],
        [
          3,
          3
        ],
        [
          7,
          7
        ],
        [
          9,
          5
        ]
      ],
      "search": null,
      "validation": {
        "accepted": false,
        "length": 11.313708498984761,
        "waypointCount": 4,
        "segmentChecks": [
          {
            "index": 0,
            "from": [
              1,
              5
            ],
            "to": [
              3,
              3
            ],
            "evaluable": true,
            "clear": true,
            "collisions": []
          },
          {
            "index": 1,
            "from": [
              3,
              3
            ],
            "to": [
              7,
              7
            ],
            "evaluable": true,
            "clear": false,
            "collisions": [
              "box"
            ]
          },
          {
            "index": 2,
            "from": [
              7,
              7
            ],
            "to": [
              9,
              5
            ],
            "evaluable": true,
            "clear": true,
            "collisions": []
          }
        ],
        "checks": [
          {
            "id": "finite",
            "label": "Finite input; at least two waypoints",
            "passed": true,
            "detail": "4 waypoints; coordinates must be finite numbers."
          },
          {
            "id": "endpoints",
            "label": "Exact start and goal",
            "passed": true,
            "detail": "Start (1, 5); goal (9, 5)."
          },
          {
            "id": "bounds",
            "label": "Entire route inside map",
            "passed": true,
            "detail": "All waypoints must lie inside the bounds. Straight segments between them stay inside the rectangular map."
          },
          {
            "id": "waypoints",
            "label": "Waypoints clear of closed obstacles",
            "passed": true,
            "detail": "Obstacle interiors and boundaries both reject a point."
          },
          {
            "id": "segments",
            "label": "Every connecting segment clear",
            "passed": false,
            "detail": "3 whole segments checked, including boundary contact and repeated points."
          },
          {
            "id": "length",
            "label": "Finite measured length",
            "passed": true,
            "detail": "Length is a secondary measurement; it never cancels a failed constraint."
          }
        ],
        "errors": [
          {
            "code": "segment-obstacle",
            "segment": 1,
            "obstacle": "box",
            "message": "Segment 2 touches or crosses obstacle box."
          }
        ]
      },
      "outcome": "rejected"
    },
    {
      "id": "grid-route",
      "label": "4. Finite grid search",
      "description": "Breadth-first search finds a shortest route on the stated unit grid. Its 12 unit-length edges are not a claim of continuous-space optimality.",
      "map": {
        "id": "closed-box",
        "bounds": {
          "minX": 0,
          "maxX": 10,
          "minY": 0,
          "maxY": 10
        },
        "start": [
          1,
          5
        ],
        "goal": [
          9,
          5
        ],
        "obstacles": [
          {
            "id": "box",
            "minX": 4,
            "maxX": 6,
            "minY": 4,
            "maxY": 6
          }
        ]
      },
      "route": [
        [
          1,
          5
        ],
        [
          2,
          5
        ],
        [
          3,
          5
        ],
        [
          3,
          6
        ],
        [
          3,
          7
        ],
        [
          4,
          7
        ],
        [
          5,
          7
        ],
        [
          6,
          7
        ],
        [
          7,
          7
        ],
        [
          8,
          7
        ],
        [
          9,
          7
        ],
        [
          9,
          6
        ],
        [
          9,
          5
        ]
      ],
      "search": {
        "status": "found",
        "route": [
          [
            1,
            5
          ],
          [
            2,
            5
          ],
          [
            3,
            5
          ],
          [
            3,
            6
          ],
          [
            3,
            7
          ],
          [
            4,
            7
          ],
          [
            5,
            7
          ],
          [
            6,
            7
          ],
          [
            7,
            7
          ],
          [
            8,
            7
          ],
          [
            9,
            7
          ],
          [
            9,
            6
          ],
          [
            9,
            5
          ]
        ],
        "graph": {
          "bounds": {
            "minX": 0,
            "maxX": 10,
            "minY": 0,
            "maxY": 10
          },
          "spacing": 1,
          "connectivity": "four-neighbour",
          "edgeLength": 1,
          "candidatePositions": 121,
          "vertices": 112,
          "undirectedEdges": 196,
          "discoveredVertices": 108,
          "processedVertices": 100,
          "exhausted": false,
          "obstaclePolicy": "closed boundaries; every edge checked",
          "directionOrder": [
            [
              1,
              0
            ],
            [
              0,
              1
            ],
            [
              0,
              -1
            ],
            [
              -1,
              0
            ]
          ]
        }
      },
      "validation": {
        "accepted": true,
        "length": 12,
        "waypointCount": 13,
        "segmentChecks": [
          {
            "index": 0,
            "from": [
              1,
              5
            ],
            "to": [
              2,
              5
            ],
            "evaluable": true,
            "clear": true,
            "collisions": []
          },
          {
            "index": 1,
            "from": [
              2,
              5
            ],
            "to": [
              3,
              5
            ],
            "evaluable": true,
            "clear": true,
            "collisions": []
          },
          {
            "index": 2,
            "from": [
              3,
              5
            ],
            "to": [
              3,
              6
            ],
            "evaluable": true,
            "clear": true,
            "collisions": []
          },
          {
            "index": 3,
            "from": [
              3,
              6
            ],
            "to": [
              3,
              7
            ],
            "evaluable": true,
            "clear": true,
            "collisions": []
          },
          {
            "index": 4,
            "from": [
              3,
              7
            ],
            "to": [
              4,
              7
            ],
            "evaluable": true,
            "clear": true,
            "collisions": []
          },
          {
            "index": 5,
            "from": [
              4,
              7
            ],
            "to": [
              5,
              7
            ],
            "evaluable": true,
            "clear": true,
            "collisions": []
          },
          {
            "index": 6,
            "from": [
              5,
              7
            ],
            "to": [
              6,
              7
            ],
            "evaluable": true,
            "clear": true,
            "collisions": []
          },
          {
            "index": 7,
            "from": [
              6,
              7
            ],
            "to": [
              7,
              7
            ],
            "evaluable": true,
            "clear": true,
            "collisions": []
          },
          {
            "index": 8,
            "from": [
              7,
              7
            ],
            "to": [
              8,
              7
            ],
            "evaluable": true,
            "clear": true,
            "collisions": []
          },
          {
            "index": 9,
            "from": [
              8,
              7
            ],
            "to": [
              9,
              7
            ],
            "evaluable": true,
            "clear": true,
            "collisions": []
          },
          {
            "index": 10,
            "from": [
              9,
              7
            ],
            "to": [
              9,
              6
            ],
            "evaluable": true,
            "clear": true,
            "collisions": []
          },
          {
            "index": 11,
            "from": [
              9,
              6
            ],
            "to": [
              9,
              5
            ],
            "evaluable": true,
            "clear": true,
            "collisions": []
          }
        ],
        "checks": [
          {
            "id": "finite",
            "label": "Finite input; at least two waypoints",
            "passed": true,
            "detail": "13 waypoints; coordinates must be finite numbers."
          },
          {
            "id": "endpoints",
            "label": "Exact start and goal",
            "passed": true,
            "detail": "Start (1, 5); goal (9, 5)."
          },
          {
            "id": "bounds",
            "label": "Entire route inside map",
            "passed": true,
            "detail": "All waypoints must lie inside the bounds. Straight segments between them stay inside the rectangular map."
          },
          {
            "id": "waypoints",
            "label": "Waypoints clear of closed obstacles",
            "passed": true,
            "detail": "Obstacle interiors and boundaries both reject a point."
          },
          {
            "id": "segments",
            "label": "Every connecting segment clear",
            "passed": true,
            "detail": "12 whole segments checked, including boundary contact and repeated points."
          },
          {
            "id": "length",
            "label": "Finite measured length",
            "passed": true,
            "detail": "Length is a secondary measurement; it never cancels a failed constraint."
          }
        ],
        "errors": []
      },
      "outcome": "accepted"
    },
    {
      "id": "blocked-grid",
      "label": "5. Blocked grid",
      "description": "Search exhausts every reachable vertex of this finite graph without reaching the goal. This result is limited to the graph, not a robot or an arbitrary continuous planning problem.",
      "map": {
        "id": "full-height-wall",
        "bounds": {
          "minX": 0,
          "maxX": 10,
          "minY": 0,
          "maxY": 10
        },
        "start": [
          1,
          5
        ],
        "goal": [
          9,
          5
        ],
        "obstacles": [
          {
            "id": "wall",
            "minX": 4,
            "maxX": 6,
            "minY": 0,
            "maxY": 10
          }
        ]
      },
      "route": null,
      "search": {
        "status": "no-path-on-grid",
        "route": null,
        "graph": {
          "bounds": {
            "minX": 0,
            "maxX": 10,
            "minY": 0,
            "maxY": 10
          },
          "spacing": 1,
          "connectivity": "four-neighbour",
          "edgeLength": 1,
          "candidatePositions": 121,
          "vertices": 88,
          "undirectedEdges": 146,
          "discoveredVertices": 44,
          "processedVertices": 44,
          "exhausted": true,
          "obstaclePolicy": "closed boundaries; every edge checked",
          "directionOrder": [
            [
              1,
              0
            ],
            [
              0,
              1
            ],
            [
              0,
              -1
            ],
            [
              -1,
              0
            ]
          ]
        }
      },
      "validation": null,
      "outcome": "no-path-on-grid"
    }
  ]
}
