Inspiration
What it does
How we built it
Challenges we ran into
Accomplishments that we're proud of
What we learned
What's next for LoopLess
Inspiration
Students and families juggle errands with hard closing times, opening windows, and ordering rules (you have to pick up parts before dropping off a project kit). Doing errands in the order you wrote them down wastes travel time and causes preventable late arrivals. I built LoopLess to turn a daily errand list into an exact, inspectable route and schedule where every minute of travel, waiting, and service is visible on a map and timeline.
What it does
LoopLess is a zero-dependency, offline route and schedule studio with an exact Branch-and-Bound solver:
- Exact Lexicographic Tour Optimization: Optimizes daily stop sequences in strict priority order: (1) satisfy prerequisites, (2) minimize missed completion deadlines, (3) minimize total lateness, (4) minimize total day span including waits and return trip, (5) minimize travel minutes, and (6) maximize minimum deadline margin.
- 2D Mile-Grid Overlay and Synchronized Replay: Draws dashed FIFO vs. solid LoopLess routes on an interactive SVG map. Play, Pause, Step, restart, and a timeline scrubber drive a single schedule clock across both the map commuter marker and Gantt playheads (covering travel, waiting, service, and return).
- Direct Map Editing and Safe History: Click empty map space to add stops, inspect or edit windows, coordinates, durations, and prerequisites, reject cycles and unsafe prerequisite deletions, and step through 40-step undo/redo history.
- 4-Mode Comparison and Delay Tipping-Point Sweep: Compares Walk, Bike, Bus/Rail, and Carpool side by side, and runs an independently re-optimized 16-point delay curve (
+0through+15minutes per moving leg) to pinpoint the exact delay where the day first breaks. - Reproducible 16-Scenario Benchmark: Runs the fixed benchmark corpus directly in the browser and CLI (
npm run eval:check), comparing LoopLess against FIFO, Earliest Deadline First (EDF), and Nearest Neighbor. - Hardened Sharing, RFC 5545
.ics, JSON, and One-Page Daily Card: Encodes#tour=links with strict schema validation, exports CRLF-folded.icscalendars and full JSON diagnostics, and previews a printable single-page daily card in an accessible modal dialog.
How we built it
LoopLess is built with vanilla HTML, CSS, and ES modules with zero external dependencies:
js/planner.mjsimplements the Branch-and-Bound solver (up to 12 stops exact with admissible outgoing-travel and remaining-service lower bounds, monotone lateness bounds, and a 1,500,000-node safety budget that falls back honestly to labeled 2-opt polishing if exhausted), plus schedule evaluation and RFC 5545 calendar generation.js/studio.mjshandles transactional validation, cycle rejection, 40-step history,#tour=base64url allowlist decoding, safelocalStoragepersistence, 4-mode comparison, and exact delay sweeps.js/map.mjshandles mile-grid projection, nearby-pin decluttering with leader lines to exact coordinates, route vertices, and synchronized replay interpolation.js/solver-worker.mjsruns solves off the main thread with typed request IDs and stale-response cancellation, with a labeled main-thread fallback.js/app.jsrenders all dynamic content viatextContentand created DOM/SVG nodes with zero HTML-parsing sinks, daylight and dark 4.5:1 contrast palettes, and the reactive#capybara-buddymascot.
Challenges we ran into
Designing admissible lower bounds that stayed valid for open tours (where no final return leg exists) and zero-distance co-located stops required careful verification against an independent brute-force oracle. On the UI side, keeping nearby pins clickable without distorting true route geometry led to decluttered pin hit targets with leader lines back to exact model coordinates. Hardening #tour= links meant enforcing strict field allowlists, coordinate/time bounds, prototype-pollution guards, and 10,000-byte decoded payload caps.
Accomplishments that we're proud of
- 149 automated tests pass with 0 failures (
npm test) plus 100% pass onnpm run eval:check. - Zero objective gap on 45 small tours (
N <= 7): Verified against an independent brute-force oracle covering 13 fixed benchmark cases, all 4 studio presets, and 28 seeded edge cases. - Verified default after-school preset (fictional bicycle model): Cuts travel from
134 min(FIFO) to78 min(56 minsaved), shortens total day span from244 minto145 min(99 minearlier finish:19:34->17:55), rescues all3missed deadlines (3->0), and holds feasible up to+12 mindelay per moving leg before failing at+13 min. - Verified fixed 16-scenario benchmark (
npm run eval:check):15/16feasible (1 intentional overload probe) vs. FIFO10/16, EDF15/16, Nearest8/16;1,611 mintotal travel vs.2,242 minFIFO (631 minsaved,-28.1%);3,083 mintotal clock span vs.3,850 minFIFO (767 minsaved,-19.9%); beats FIFO on14/16and beats or ties all three baselines on16/16.
What we learned
An independent brute-force oracle turns solver confidence from guesswork into proof on every small instance. Equally important is honest model scoping: LoopLess explicitly states that its presets are synthetic Houston/Sugar Land examples using constant-speed Manhattan/Euclidean estimates, not live road routing or real transit timetables.
What's next for LoopLess
Add optional offline road-graph travel time matrices, multi-person household carpool splitting, richer soft-window preferences, and optional import of existing .ics commitments as fixed anchor blocks.
Honest AI Disclosure
An AI coding assistant helped implement the solver, Web Worker wiring, SVG route studio, tests, and documentation. I defined the exact lexicographic objective and guardrails, reviewed every change, ran all 149 tests and the 16-scenario benchmark locally, and can explain all of the code. No AI model runs at runtime.
Built With
- css
- es-modules
- html
- javascript
- node.js
- rfc-5545-icalendar
- svg
- web-workers