Code for Community 1st Place
- Vivian Li
- Jul 6
- 1 min read
KnightsCoders | USA
Detour is a pedestrian navigation application that helps people find safer walking/travel routes through cities instead of simply the fastest ones. Using a custom-modified A* pathfinding algorithm, Detour assigns every street segment a dynamic risk score based on real crime incident data, street lighting, proximity to safe locations such as police stations or hospitals, time of day, and anonymous community safety reports.
Rather than providing only the shortest route, Detour generates both the fastest route and a safer alternative, allowing users to compare the reduction in risk with the additional travel time. Users can also adjust a safety preference slider to control how much the algorithm prioritizes safety versus speed, creating routes that fit their individual comfort level.
To make route recommendations easier to understand, Detour includes a dynamic risk heat map that updates based on the time of day and highlights higher-and lower risk areas throughout the city. It also features Street Intel, a crowdsourced reporting system that allows users to anonymously report temporary hazards such as broken streetlights or areas that feel unsafe. These reports influence route calculations for a limited time before automatically expiring so that recommendations remain current.
By combining graph algorithms, geospatial analysis, and community participation, Detour demonstrates how computer science can improve urban mobility and public safety. The project supports UN Sustainable Development Goal 11: Sustainable Cities and Communities by promoting safer and more accessible public spaces, and UN Sustainable Development Goal 16: Peace, Justice and Strong Institutions by increasing access to public safety information and helping people make more informed decisions while traveling through their communities.

