About Nightwatch
AI-powered pedestrian navigation that prioritizes well-lit streets over shortcuts, helping you walk home safely after dark.
What Nightwatch Does
Nightwatch analyzes streetlight data from municipal sources to find pedestrian routes that maximize illumination coverage. Instead of simply finding the shortest path, we calculate routes that keep you on well-lit streets — even if it means walking a bit further.
Our system processes real streetlight locations and densities to build a safety-weighted routing graph, then uses graph algorithms to find optimal paths that balance distance with lighting quality.
How the Algorithm Works
Safety Score Calculation
Each road segment gets a safety score based on nearby streetlight density. More lights per 100 meters = higher score.
safety_score = lights_count / (segment_length / 100)Edge Cost Weighting
Road segments are weighted inversely to their safety. Safer roads become "cheaper" to traverse, encouraging the algorithm to prefer them.
edge_cost = length / (1 + safety_score)Dijkstra's Algorithm
We use Dijkstra's shortest path algorithm on the weighted graph. It finds the path with minimum total cost — which, thanks to our weighting, naturally prefers well-lit streets. This classic algorithm guarantees an optimal solution efficiently.