---
title: "Risk-Aware Path Planning"
slug: risk-aware-path-planning
date: 2026-05-01
url: https://mohammadhameed.dev/projects/risk-aware-path-planning
status: published
tags: ["robotics", "geospatial", "ai"]
technologies: ["Python", "Cesium", "Unity3D", "NumPy"]
---

{/* Sample case study for the design refresh — the thesis is the real
    artifact (linked); figures here are branded placeholders until the
    original plots are exported. */}

My master's research asked a stubborn question: when a drone flies farther
than anyone can see it, how should it choose a route that *minimizes* the
damage of being wrong?

Shortest-path is the wrong objective. In controlled airspace, a 3 km route
that grazes a hospital helipad is worse than a 5 km route around it — even
if the long one is "safe" at the level of meters. Risk is not binary. It has
altitude, population, weather, and a time of day.

## The core idea: spend resolution where consequence lives

A uniform grid forces one resolution everywhere. Fly over an empty field and
you still pay per cell. Fly over a stadium and you still get one coarse
"medium risk." Both are wrong.

The framework stores risk in a **layered sampling quadtree**: dense where the
world is dense, sparse where the world is boring, and every level of the
tree is queryable at flight time.

```text
L0  ▣ 5 km cells      — corridor-level weather, terrain mask
L1  ▣ 500 m cells     — population, NOTAM regions
L2  ▣ 50 m cells      — no-fly polygons, obstacles, gyms with cranes
```

Risk at a point is an interval: the coarse layers give a trend, the fine
layers give a confidence width. The planner never sees a single optimistic
number pretending to be truth.

<Figure src="/images/projects/risk-aware-path-planning-alt.svg" alt="The layered quadtree with a route threading low-risk volumes" caption="A route is only as good as the resolution it admits it can't see." />

## Risk-aware A*

The planner is A* over a 3D graph with a cost function that reads the
quadtree interval — not just the mean. The weighting is where the research
lives: how much to pay for variance versus expected exposure.

| Cost term | Plain A* | Risk-aware |
| --- | --- | --- |
| Distance | ✓ | ✓ |
| Expected exposure | — | mean risk × time in cell |
| Uncertainty | — | interval width penalty |
| Hard constraints | point queries | tree-consistent volumes |

<Callout type="outcome">
Across 27,000 simulated routes, the risk-aware planner cut time spent in
high-risk cells by 41% against distance-optimal paths — at an average route
penalty of only 11%.
</Callout>

## Why a simulator and not just a solver

A planner people can't watch is a planner people won't trust. The second
half of the thesis was a Cesium/Unity visualization where routes fly against
live terrain and airspace layers — the same interface later doubled as the
defense-demo stage.

<Embed
  kind="map"
  src="https://www.openstreetmap.org/export/embed.html?bbox=-114.35%2C50.85%2C-113.85%2C51.2&layer=mapnik"
  title="Calgary — the terrain that taught me why corridor-level weather matters"
/>

## What transferred to industry

- **Interval reasoning beats point estimates** in production autonomy — the
  same discipline behind honest confidence in any perception stack.
- **Resolution is budget**: store truth at the granularity the decision
  actually consumes, not the granularity available.
- **Visual proof sells algorithms.** Every reviewer could watch the route
  fail gracefully around a stadium instead of reading a table.

The full thesis lives at the [University of Calgary repository](https://hdl.handle.net/1880/125583).
Happy to walk anyone through the quadtree math — [that's what the contact page is for](/contact).
