kylelai.org / projects

San José State · CS 255

Campus Route Planner

The shortest walk between any two buildings, found with Dijkstra's algorithm on 2,021 walkway intersections. Watch it search.

      Loading campus map…

      –walking distance
      –at 1.4 m/s
      0settled
      0in heap
      0relaxations
      0 mcurrent dist

      Press play to watch Dijkstra search.

      Inside dijkstra.py
      heap = [(0, source)]
      while heap:
          distance, node = heapq.heappop(heap)
          if distance > dist[node]:
              continue          # stale entry
          for neighbor, weight in graph[node]:
              new_distance = distance + weight
              if new_distance < dist[neighbor]:
                  dist[neighbor] = new_distance
                  prev[neighbor] = node
                  heapq.heappush(heap, (new_distance, neighbor))

      Our team's Python implementation, running in your browser as a line-for-line JavaScript port. Binary heap with lazy deletion, O((V + E) log V). It returns the same path as the Python on 400 of 400 test routes.

      • In the heap (frontier)
      • Settled, distance final
      • Shortest path

      By Kyle Lai, Khang Luu & Yangang Xu for CS 255 (Design & Analysis of Algorithms), San José State, Fall 2026. Walkways from OpenStreetMap via OSMnx; 3D building heights are estimates.