{
  "article_slug": "large-map-pathfinding-in-godot",
  "artifact": "Godot large-map region-filter and HPA* proof",
  "benchmark": {
    "by_query": {
      "diagonal_nw_se": {
        "hpa_refined": {
          "max_ms": 2.865,
          "mean_ms": 2.4638,
          "median_ms": 2.425,
          "p95_ms": 2.785,
          "sample_count": 30
        },
        "median_reference_over_hpa_ratio": 3.32824742268041,
        "reference": {
          "max_ms": 9.51,
          "mean_ms": 8.23193333333333,
          "median_ms": 8.071,
          "p95_ms": 9.431,
          "sample_count": 30
        }
      },
      "diagonal_sw_ne": {
        "hpa_refined": {
          "max_ms": 4.688,
          "mean_ms": 3.51673333333333,
          "median_ms": 3.395,
          "p95_ms": 3.818,
          "sample_count": 30
        },
        "median_reference_over_hpa_ratio": 2.14904270986745,
        "reference": {
          "max_ms": 9.499,
          "mean_ms": 7.60826666666667,
          "median_ms": 7.296,
          "p95_ms": 9.262,
          "sample_count": 30
        }
      },
      "horizontal_middle": {
        "hpa_refined": {
          "max_ms": 2.107,
          "mean_ms": 1.28116666666667,
          "median_ms": 1.188,
          "p95_ms": 1.77,
          "sample_count": 30
        },
        "median_reference_over_hpa_ratio": 1.74915824915825,
        "reference": {
          "max_ms": 3.364,
          "mean_ms": 2.25376666666667,
          "median_ms": 2.078,
          "p95_ms": 2.891,
          "sample_count": 30
        }
      },
      "vertical_middle": {
        "hpa_refined": {
          "max_ms": 1.828,
          "mean_ms": 1.37136666666667,
          "median_ms": 1.275,
          "p95_ms": 1.709,
          "sample_count": 30
        },
        "median_reference_over_hpa_ratio": 1.72470588235294,
        "reference": {
          "max_ms": 3.445,
          "mean_ms": 2.35036666666667,
          "median_ms": 2.199,
          "p95_ms": 3.188,
          "sample_count": 30
        }
      }
    },
    "hpa_refined": {
      "max_ms": 4.688,
      "mean_ms": 2.15826666666667,
      "median_ms": 2.107,
      "p95_ms": 3.747,
      "sample_count": 120
    },
    "median_reference_over_hpa_ratio": 1.63502610346464,
    "raw_samples_ms": {
      "hpa_refined": [
        2.413,
        3.4,
        1.156,
        1.709,
        2.425,
        3.328,
        1.191,
        1.271,
        2.422,
        3.536,
        1.317,
        1.403,
        2.607,
        3.694,
        1.523,
        1.383,
        2.464,
        3.313,
        1.136,
        1.24,
        2.353,
        3.321,
        1.175,
        1.265,
        2.474,
        3.794,
        1.179,
        1.275,
        2.471,
        3.308,
        1.163,
        1.252,
        2.406,
        3.818,
        1.166,
        1.251,
        2.358,
        3.795,
        1.188,
        1.249,
        2.533,
        3.31,
        1.314,
        1.57,
        2.351,
        3.395,
        1.233,
        1.552,
        2.388,
        3.309,
        1.577,
        1.293,
        2.396,
        3.406,
        1.279,
        1.636,
        2.486,
        3.772,
        1.77,
        1.828,
        2.785,
        4.688,
        2.107,
        1.574,
        2.468,
        3.741,
        1.266,
        1.561,
        2.73,
        3.64,
        1.262,
        1.637,
        2.865,
        3.747,
        1.143,
        1.257,
        2.358,
        3.322,
        1.179,
        1.235,
        2.575,
        3.307,
        1.194,
        1.243,
        2.319,
        3.797,
        1.142,
        1.288,
        2.385,
        3.304,
        1.162,
        1.236,
        2.457,
        3.431,
        1.284,
        1.351,
        2.486,
        3.397,
        1.195,
        1.249,
        2.44,
        3.345,
        1.187,
        1.252,
        2.4,
        3.31,
        1.158,
        1.321,
        2.352,
        3.323,
        1.164,
        1.191,
        2.448,
        3.336,
        1.136,
        1.228,
        2.299,
        3.315,
        1.489,
        1.341
      ],
      "reference": [
        7.745,
        8.064,
        2.078,
        2.189,
        8.212,
        7.297,
        2.068,
        2.188,
        9.095,
        7.217,
        2.45,
        2.546,
        8.813,
        9.499,
        2.883,
        3.188,
        9.51,
        7.234,
        2.054,
        2.176,
        7.573,
        7.233,
        2.094,
        2.176,
        7.351,
        7.34,
        2.075,
        2.193,
        9.092,
        7.219,
        2.075,
        2.185,
        8.851,
        7.264,
        2.113,
        2.191,
        7.724,
        8.318,
        2.091,
        2.226,
        7.332,
        7.22,
        2.056,
        2.383,
        7.364,
        7.204,
        2.493,
        2.443,
        7.892,
        7.225,
        2.06,
        2.285,
        8.039,
        8.539,
        2.233,
        2.309,
        9.302,
        8.011,
        2.657,
        3.445,
        9.431,
        8.357,
        3.364,
        2.555,
        9.13,
        7.761,
        2.439,
        2.537,
        8.716,
        9.262,
        2.891,
        2.715,
        8.712,
        7.292,
        2.069,
        2.23,
        8.097,
        7.296,
        2.067,
        2.161,
        7.388,
        7.221,
        2.092,
        2.163,
        7.341,
        7.257,
        2.067,
        2.376,
        9.318,
        7.39,
        2.071,
        2.196,
        7.677,
        7.503,
        2.075,
        2.235,
        8.071,
        7.559,
        2.423,
        2.294,
        8.654,
        7.223,
        2.086,
        2.186,
        7.417,
        7.375,
        2.064,
        2.19,
        8.351,
        7.48,
        2.056,
        2.167,
        7.378,
        7.162,
        2.073,
        2.199,
        7.382,
        7.226,
        2.296,
        2.184
      ]
    },
    "reference": {
      "max_ms": 9.51,
      "mean_ms": 5.11108333333333,
      "median_ms": 3.445,
      "p95_ms": 9.13,
      "sample_count": 120
    }
  },
  "checks": [
    {
      "id": "diagonal_nw_se_refinement_matches_exact_reference",
      "observed": {
        "abstract_expanded": 143,
        "goal": {
          "x": 376,
          "y": 376
        },
        "hierarchy_cost": 736,
        "hierarchy_legal": true,
        "id": "diagonal_nw_se",
        "reference_cost": 736,
        "start": {
          "x": 8,
          "y": 8
        }
      },
      "passed": true
    },
    {
      "id": "diagonal_sw_ne_refinement_matches_exact_reference",
      "observed": {
        "abstract_expanded": 206,
        "goal": {
          "x": 376,
          "y": 8
        },
        "hierarchy_cost": 736,
        "hierarchy_legal": true,
        "id": "diagonal_sw_ne",
        "reference_cost": 736,
        "start": {
          "x": 8,
          "y": 376
        }
      },
      "passed": true
    },
    {
      "id": "horizontal_middle_refinement_matches_exact_reference",
      "observed": {
        "abstract_expanded": 62,
        "goal": {
          "x": 376,
          "y": 200
        },
        "hierarchy_cost": 414,
        "hierarchy_legal": true,
        "id": "horizontal_middle",
        "reference_cost": 414,
        "start": {
          "x": 8,
          "y": 184
        }
      },
      "passed": true
    },
    {
      "id": "vertical_middle_refinement_matches_exact_reference",
      "observed": {
        "abstract_expanded": 67,
        "goal": {
          "x": 200,
          "y": 376
        },
        "hierarchy_cost": 414,
        "hierarchy_legal": true,
        "id": "vertical_middle",
        "reference_cost": 414,
        "start": {
          "x": 184,
          "y": 8
        }
      },
      "passed": true
    },
    {
      "id": "benchmark_returns_finite_positive_distributions",
      "observed": {
        "by_query": {
          "diagonal_nw_se": {
            "hpa_refined": {
              "max_ms": 2.865,
              "mean_ms": 2.4638,
              "median_ms": 2.425,
              "p95_ms": 2.785,
              "sample_count": 30
            },
            "median_reference_over_hpa_ratio": 3.32824742268041,
            "reference": {
              "max_ms": 9.51,
              "mean_ms": 8.23193333333333,
              "median_ms": 8.071,
              "p95_ms": 9.431,
              "sample_count": 30
            }
          },
          "diagonal_sw_ne": {
            "hpa_refined": {
              "max_ms": 4.688,
              "mean_ms": 3.51673333333333,
              "median_ms": 3.395,
              "p95_ms": 3.818,
              "sample_count": 30
            },
            "median_reference_over_hpa_ratio": 2.14904270986745,
            "reference": {
              "max_ms": 9.499,
              "mean_ms": 7.60826666666667,
              "median_ms": 7.296,
              "p95_ms": 9.262,
              "sample_count": 30
            }
          },
          "horizontal_middle": {
            "hpa_refined": {
              "max_ms": 2.107,
              "mean_ms": 1.28116666666667,
              "median_ms": 1.188,
              "p95_ms": 1.77,
              "sample_count": 30
            },
            "median_reference_over_hpa_ratio": 1.74915824915825,
            "reference": {
              "max_ms": 3.364,
              "mean_ms": 2.25376666666667,
              "median_ms": 2.078,
              "p95_ms": 2.891,
              "sample_count": 30
            }
          },
          "vertical_middle": {
            "hpa_refined": {
              "max_ms": 1.828,
              "mean_ms": 1.37136666666667,
              "median_ms": 1.275,
              "p95_ms": 1.709,
              "sample_count": 30
            },
            "median_reference_over_hpa_ratio": 1.72470588235294,
            "reference": {
              "max_ms": 3.445,
              "mean_ms": 2.35036666666667,
              "median_ms": 2.199,
              "p95_ms": 3.188,
              "sample_count": 30
            }
          }
        },
        "hpa_refined": {
          "max_ms": 4.688,
          "mean_ms": 2.15826666666667,
          "median_ms": 2.107,
          "p95_ms": 3.747,
          "sample_count": 120
        },
        "median_reference_over_hpa_ratio": 1.63502610346464,
        "raw_samples_ms": {
          "hpa_refined": [
            2.413,
            3.4,
            1.156,
            1.709,
            2.425,
            3.328,
            1.191,
            1.271,
            2.422,
            3.536,
            1.317,
            1.403,
            2.607,
            3.694,
            1.523,
            1.383,
            2.464,
            3.313,
            1.136,
            1.24,
            2.353,
            3.321,
            1.175,
            1.265,
            2.474,
            3.794,
            1.179,
            1.275,
            2.471,
            3.308,
            1.163,
            1.252,
            2.406,
            3.818,
            1.166,
            1.251,
            2.358,
            3.795,
            1.188,
            1.249,
            2.533,
            3.31,
            1.314,
            1.57,
            2.351,
            3.395,
            1.233,
            1.552,
            2.388,
            3.309,
            1.577,
            1.293,
            2.396,
            3.406,
            1.279,
            1.636,
            2.486,
            3.772,
            1.77,
            1.828,
            2.785,
            4.688,
            2.107,
            1.574,
            2.468,
            3.741,
            1.266,
            1.561,
            2.73,
            3.64,
            1.262,
            1.637,
            2.865,
            3.747,
            1.143,
            1.257,
            2.358,
            3.322,
            1.179,
            1.235,
            2.575,
            3.307,
            1.194,
            1.243,
            2.319,
            3.797,
            1.142,
            1.288,
            2.385,
            3.304,
            1.162,
            1.236,
            2.457,
            3.431,
            1.284,
            1.351,
            2.486,
            3.397,
            1.195,
            1.249,
            2.44,
            3.345,
            1.187,
            1.252,
            2.4,
            3.31,
            1.158,
            1.321,
            2.352,
            3.323,
            1.164,
            1.191,
            2.448,
            3.336,
            1.136,
            1.228,
            2.299,
            3.315,
            1.489,
            1.341
          ],
          "reference": [
            7.745,
            8.064,
            2.078,
            2.189,
            8.212,
            7.297,
            2.068,
            2.188,
            9.095,
            7.217,
            2.45,
            2.546,
            8.813,
            9.499,
            2.883,
            3.188,
            9.51,
            7.234,
            2.054,
            2.176,
            7.573,
            7.233,
            2.094,
            2.176,
            7.351,
            7.34,
            2.075,
            2.193,
            9.092,
            7.219,
            2.075,
            2.185,
            8.851,
            7.264,
            2.113,
            2.191,
            7.724,
            8.318,
            2.091,
            2.226,
            7.332,
            7.22,
            2.056,
            2.383,
            7.364,
            7.204,
            2.493,
            2.443,
            7.892,
            7.225,
            2.06,
            2.285,
            8.039,
            8.539,
            2.233,
            2.309,
            9.302,
            8.011,
            2.657,
            3.445,
            9.431,
            8.357,
            3.364,
            2.555,
            9.13,
            7.761,
            2.439,
            2.537,
            8.716,
            9.262,
            2.891,
            2.715,
            8.712,
            7.292,
            2.069,
            2.23,
            8.097,
            7.296,
            2.067,
            2.161,
            7.388,
            7.221,
            2.092,
            2.163,
            7.341,
            7.257,
            2.067,
            2.376,
            9.318,
            7.39,
            2.071,
            2.196,
            7.677,
            7.503,
            2.075,
            2.235,
            8.071,
            7.559,
            2.423,
            2.294,
            8.654,
            7.223,
            2.086,
            2.186,
            7.417,
            7.375,
            2.064,
            2.19,
            8.351,
            7.48,
            2.056,
            2.167,
            7.378,
            7.162,
            2.073,
            2.199,
            7.382,
            7.226,
            2.296,
            2.184
          ]
        },
        "reference": {
          "max_ms": 9.51,
          "mean_ms": 5.11108333333333,
          "median_ms": 3.445,
          "p95_ms": 9.13,
          "sample_count": 120
        }
      },
      "passed": true
    },
    {
      "id": "cluster_revision_invalidates_old_edges_and_rebuilds_exact_route",
      "observed": {
        "changed_cell": {
          "x": 200,
          "y": 200
        },
        "cluster": {
          "x": 6,
          "y": 6
        },
        "hierarchy_cost_after_repair": 736,
        "old_edges_invalid": true,
        "reference_cost_after_repair": 736,
        "repair_distribution": {
          "max_ms": 0.137,
          "mean_ms": 0.1065,
          "median_ms": 0.103,
          "p95_ms": 0.125,
          "sample_count": 40
        }
      },
      "passed": true
    },
    {
      "id": "empty_include_means_all_and_exclusion_wins",
      "observed": {
        "all_regions": {
          "endpoint": {
            "x": 176.0,
            "y": 32.0
          },
          "path_points": 4,
          "reached": true
        },
        "empty_include": {
          "endpoint": {
            "x": 176.0,
            "y": 32.0
          },
          "path_points": 4,
          "reached": true
        },
        "middle_included_and_excluded": {
          "endpoint": {
            "x": 64.0,
            "y": 32.0
          },
          "path_points": 2,
          "reached": false
        },
        "missing_goal_region": {
          "endpoint": {
            "x": 128.0,
            "y": 32.0
          },
          "path_points": 3,
          "reached": false
        },
        "missing_middle_region": {
          "endpoint": {
            "x": 64.0,
            "y": 32.0
          },
          "path_points": 2,
          "reached": false
        },
        "polygon_limit_one": {
          "endpoint": {
            "x": 64.0,
            "y": 32.0
          },
          "path_points": 2,
          "reached": false
        }
      },
      "passed": true
    },
    {
      "id": "positive_polygon_limit_can_return_a_partial_path",
      "observed": {
        "endpoint": {
          "x": 64.0,
          "y": 32.0
        },
        "path_points": 2,
        "reached": false
      },
      "passed": true
    },
    {
      "id": "extracted_package_reruns_cleanly",
      "passed": true,
      "observed": {
        "extracted_logic_check_count": 8,
        "check_ids_match_workspace": true,
        "scene_smoke_passed": true,
        "engine": "4.7.1-stable (official)"
      }
    }
  ],
  "correctness": [
    {
      "abstract_expanded": 143,
      "goal": {
        "x": 376,
        "y": 376
      },
      "hierarchy_cost": 736,
      "hierarchy_legal": true,
      "id": "diagonal_nw_se",
      "reference_cost": 736,
      "start": {
        "x": 8,
        "y": 8
      }
    },
    {
      "abstract_expanded": 206,
      "goal": {
        "x": 376,
        "y": 8
      },
      "hierarchy_cost": 736,
      "hierarchy_legal": true,
      "id": "diagonal_sw_ne",
      "reference_cost": 736,
      "start": {
        "x": 8,
        "y": 376
      }
    },
    {
      "abstract_expanded": 62,
      "goal": {
        "x": 376,
        "y": 200
      },
      "hierarchy_cost": 414,
      "hierarchy_legal": true,
      "id": "horizontal_middle",
      "reference_cost": 414,
      "start": {
        "x": 8,
        "y": 184
      }
    },
    {
      "abstract_expanded": 67,
      "goal": {
        "x": 200,
        "y": 376
      },
      "hierarchy_cost": 414,
      "hierarchy_legal": true,
      "id": "vertical_middle",
      "reference_cost": 414,
      "start": {
        "x": 184,
        "y": 8
      }
    }
  ],
  "engine": {
    "build": "official",
    "hash": "a13da4feb8d8aefc283c3763d33a2f170a18d541",
    "hex": 263937,
    "major": 4,
    "minor": 7,
    "patch": 1,
    "status": "stable",
    "string": "4.7.1-stable (official)",
    "timestamp": 0
  },
  "failed": [],
  "failed_count": 0,
  "graph": {
    "abstract_nodes": 528,
    "build_time_ms": 49.457,
    "cluster_size": 32,
    "clusters": 144,
    "directed_abstract_edges": 1976,
    "grid_size": {
      "x": 384,
      "y": 384
    },
    "hierarchy_build_time_ms": 39.799,
    "low_level_build_time_ms": 9.649,
    "walkable_cells": 131572
  },
  "host": {
    "logical_processor_count": 12,
    "os": "Windows",
    "os_version": "10.0.26200",
    "processor": "AMD Ryzen 5 2600X Six-Core Processor"
  },
  "invalidation": {
    "changed_cell": {
      "x": 200,
      "y": 200
    },
    "cluster": {
      "x": 6,
      "y": 6
    },
    "hierarchy_cost_after_repair": 736,
    "old_edges_invalid": true,
    "reference_cost_after_repair": 736,
    "repair_distribution": {
      "max_ms": 0.137,
      "mean_ms": 0.1065,
      "median_ms": 0.103,
      "p95_ms": 0.125,
      "sample_count": 40
    }
  },
  "navigation_region_filters": {
    "all_regions": {
      "endpoint": {
        "x": 176.0,
        "y": 32.0
      },
      "path_points": 4,
      "reached": true
    },
    "empty_include": {
      "endpoint": {
        "x": 176.0,
        "y": 32.0
      },
      "path_points": 4,
      "reached": true
    },
    "middle_included_and_excluded": {
      "endpoint": {
        "x": 64.0,
        "y": 32.0
      },
      "path_points": 2,
      "reached": false
    },
    "missing_goal_region": {
      "endpoint": {
        "x": 128.0,
        "y": 32.0
      },
      "path_points": 3,
      "reached": false
    },
    "missing_middle_region": {
      "endpoint": {
        "x": 64.0,
        "y": 32.0
      },
      "path_points": 2,
      "reached": false
    },
    "polygon_limit_one": {
      "endpoint": {
        "x": 64.0,
        "y": 32.0
      },
      "path_points": 2,
      "reached": false
    }
  },
  "passed": true,
  "passed_count": 9,
  "proof_boundary": {
    "benchmark_interpretation": "A local micro-benchmark for this fixed map and build. Ratios are not portable engine guarantees.",
    "not_verified": "Universal HPA* speedups, memory use, threaded throughput, runtime navmesh baking, ResourceLoader disk throughput, arbitrary weighted/directed grids, or production PathForge APIs.",
    "verified": "Exact reference/refinement agreement on four authored long routes, abstract-edge revision invalidation, local cluster repair, included/excluded region precedence, partial bounded results, and local query-time distributions on the declared apparatus."
  },
  "protocol": {
    "background_load_or_map_sync_inside_query_timing": false,
    "clock": "Time.get_ticks_usec() around one synchronous query",
    "cluster_size": 32,
    "execution": "synchronous single-threaded calls from one headless verifier",
    "fixture_topology": "The 12x12 cluster partition also authors the low-level map: every internal cluster boundary is a two-cell wall with one single-cell gate. The map is therefore not independent of cluster_size.",
    "grid_size": {
      "x": 384,
      "y": 384
    },
    "movement": "four-way unit-cost",
    "query_cases": 4,
    "sample_order": "reference/HPA order alternates per full fixed-query-suite cycle, so every route sees both orders",
    "timed_samples_per_method": 120,
    "warmup_rounds_per_method": 12
  },
  "scene_smoke": {
    "passed": true,
    "report": {
      "abstract_expanded": 74,
      "hierarchy_cost": 224,
      "hierarchy_legal": true,
      "hierarchy_reaches_goal": true,
      "reference_cost": 224,
      "reference_reaches_goal": true,
      "stats": {
        "abstract_nodes": 224,
        "build_time_ms": 8.868,
        "cluster_size": 16,
        "clusters": 64,
        "directed_abstract_edges": 808,
        "grid_size": {
          "x": 128,
          "y": 128
        },
        "hierarchy_build_time_ms": 7.691,
        "low_level_build_time_ms": 1.177,
        "walkable_cells": 13220
      }
    }
  },
  "schema_version": 1,
  "verified_at_utc": "2026-08-12T06:43:36",
  "published_files": {
    "source_zip": {
      "path": "/downloads/pathforge/large-map-pathfinding-in-godot-source.zip",
      "bytes": 12598,
      "sha256": "73a18cfb16a16869b8a3eb9f2dfc2c826a54c4358c4f8b06411a9249b63dee17"
    },
    "proof_image": {
      "path": "/images/blog/large-map-pathfinding-in-godot-proof.png",
      "bytes": 48124,
      "sha256": "7e1ff2ae11c7e8c624878e8a631b322876cf35f24e9778c276fb44a7c4014c5c"
    },
    "core_source": {
      "path_in_zip": "scripts/articles/large_map_hpa_grid.gd",
      "sha256": "5ca58747f176eb18b0c80d210b15fe32aa386f64862628fe107f79de40b2ca28"
    },
    "demo_source": {
      "path_in_zip": "scripts/articles/large_map_pathfinding_demo.gd",
      "sha256": "5f1808acf967ed8ba28302740958ef1feb1bbb24b5f433a620d95251f2d65a6a"
    },
    "verifier_source": {
      "path_in_zip": "tools/verify_large_map_pathfinding.gd",
      "sha256": "1116e95e6700d5c40b1471ac3c7f6b1cf430905065d6b7804f3bd2b9b9a575e6"
    }
  },
  "extracted_package_rerun": {
    "passed": true,
    "logic_check_count": 8,
    "published_check_count": 9,
    "check_ids_match_workspace": true,
    "scene_smoke_passed": true,
    "engine": "4.7.1-stable (official)"
  }
}
