Skip to content

feat: add multiscale shortest path #429

Description

@otto-link

use case: path finding, hydrology/flow fixing

Add a fast coarse-to-fine shortest path algorithm for large 2D grids, prioritizing speed over perfect optimality.

The idea is to:

  • Solve the path on a coarse version of the cost map using Dijkstra.
  • Upsample the resulting path to the next resolution.
  • Build a narrow corridor around the path.
  • Solve again at the finer resolution, restricted to this corridor.
  • Repeat for a configurable number of levels.

This should drastically reduce the number of cells explored while retaining a good approximation of the full-resolution shortest path.

Possible parameters:

  • number of levels
  • corridor width / width decay
  • A* vs Dijkstra
  • optional path smoothing

The approach should work particularly well for large terrain cost maps where the optimal path is expected to vary smoothly across scales.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    theme: terrain-semanticsSettlements, vegetation, landscape reasoning (grant cluster)

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions