Files
patriothacks/.omo/proposals_cluster_a.md

23 KiB
Raw Permalink Blame History

Three proposals — Life Underground (Patriot HackFest Fall 2026)

Author: cluster-a. Window: writing on Nov 17, event ends Nov 20 → 3 working days assumed. All cited libraries verified live this session (PyPI/npm returned HTTP 200): psychrolib, ruptures, cvxpy, scipy, opencv-python, chart.js, @meshtastic/js.

Recon note that shapes everything below: I read the actual repos, not just the brief.

  • Stratum is not merely a "phone app" — its core is a deterministic district simulator ("District 7", 6 levels × 4 sectors) whose adapters p01/p02/p03 already model all three of my problems: p01 warns from the mains hum (ENF) heard by a phone mic and a CO2 model; p02 is a Fair-Share water-filling allocator with per-good life floors scored by "worst-decile served fraction"; p03 divides a cooling pool with rotating refuge rooms scored by "person-hours above 27.5 °C wet-bulb". It is evidence-heavy (real ENF-WHU grid recordings, GECCO-2018 water data) and genuinely strong. Beating it means out-mechanism-ing it, not re-skinning it.
  • HollowSignal is a single-sector browser planner (6 neighborhoods, 19k residents) with power/water/heat scenarios, a side-by-side allocation comparison, and refuge routing. It overlaps my problem 2 and (loosely) 3.
  • Undercurrent (mesh + hash-chained log + AI triage) barely touches my three.

PROPOSAL 1 — "Blackout Canary"

One-line pitch: A phone-free edge sensor that forecasts minutes-to-cut for power and air as an actual countdown — and keeps warning after the lights go out, because it runs on a hand-crank, not your dying phone.

Problem restatement

The Directorate sheds power and ventilation on its own schedule and lies in the official numbers. Residents get no warning, so a cut arrives as a surprise: no time to fill water, charge lamps, move the frail to a refuge, or open a manual air path. "Warn before the cut" means (a) detect the precursor of an impending shed, (b) convert it into a concrete lead time ("~9 min to power shed", "~22 min to unsafe air"), and (c) deliver that warning on infrastructure that survives the cut itself.

Concrete mechanism (named algorithms, no hand-waving)

Three cheap, independent signals, each with an explicit estimator:

  1. Power precursor via light-flicker, not audio. A phototransistor (or a phone camera's rolling shutter) samples a mains-powered lamp at ~1–2 kHz. Two features are extracted:

    • Mains frequency (ENF) from flicker: the 100/120 Hz flicker envelope tracks grid frequency; a short-time Goertzel/FFT recovers f(t). This is the same physics Stratum uses, but via light instead of the microphone — robust in a noisy tunnel and workable from a bare photodiode.
    • Voltage sag: lamp mean brightness and flicker depth fall as the grid is loaded toward a shed.
    • Shed forecast: run CUSUM change-point detection (ruptures, or a 20-line hand-rolled two-sided CUSUM) on f(t) and brightness to flag the onset of a sustained sag; then fit an EWMA/linear trend to the sag slope and extrapolate the time to cross the shed threshold (Stratum's own numbers: AMBER ≈ 4.79 % loss, shed ≈ 5.24 %). Output = estimated minutes to shed + confidence band. A sudden breaker trip crosses threshold within one sample → emit "imminent, unwarnable" honestly, exactly as Stratum concedes for trips.
  2. Air precursor via a first-order CO2 mass-balance. An NDIR/photoacoustic CO2 sensor (Sensirion SCD41, I²C, ~US$25) reads ppm. In a sealed volume the dynamics are dC/dt = G/V − (Q/V)·(C − C_out), where G = generation (∝ occupancy), V = volume, Q = ventilation airflow. When a ventilation cut drops Q, dC/dt jumps. The node continuously fits (G, Q) from the last few minutes of the CO2 curve by least squares, then integrates the ODE forward to the 1000 / 2000 / 5000 ppm thresholds → minutes-to-unsafe-air. This is textbook indoor-air physics, fully deterministic, and is the piece no competitor turns into a countdown.

  3. Tamper-evidence against the Directorate. Each node signs its readings (Ed25519). A warning also fires when the crowd-sensed signals diverge from the Directorate's "all-OK" feed — i.e. it catches the Directorate masking a cut, which is the political heart of the scenario.

Resilience is the differentiator's teeth: phones need charging; a power cut kills the very device Stratum relies on. Canary is a hand-crank/solar edge node (ESP32 or RP2040) that keeps sensing, alarms locally (buzzer + LED bar = the countdown), and rebroadcasts over a LoRa mesh so one node's warning reaches a level with no network and no mains.

Architecture + tech stack (all real, checkable, free/open)

  • Firmware: ESP32 (Arduino-ESP32 / PlatformIO) or RP2040 (MicroPython). Sensors: phototransistor → ADC; SCD41 → I²C (Sensirion open driver). Mesh: RFM95 LoRa, optionally Meshtastic firmware (open source) with the @meshtastic/js client (verified on npm) for the dashboard link.
  • Algorithm (authoritative copy, runs the demo): Python — numpy/scipy for the ODE least-squares and EWMA, ruptures (verified on PyPI) for CUSUM. Mirrored in C for the firmware.
  • Dashboard / judge view: Vite + vanilla JS + chart.js (verified on npm). It replays recorded sensor traces (synthetic + any real ENF trace, e.g. the public ENF-WHU set Stratum already uses) and runs the identical forecast logic (ported to JS or compiled to WASM) so LIVE and REPLAY give the same numbers.
  • Honesty flag: if no hardware arrives in time, everything except the physical node is still real — ship the firmware source + wiring diagram as "LIVE-ready" and demo the algorithm against replayed traces. Do not fake a device on stage.

3-day build plan

  • Day 1: Implement + unit-test the two estimators in Python against synthetic traces with known ground-truth cut times (measure actual lead-time error). Define the trace format. If hardware present, flash ESP32 + read SCD41 + photodiode into a serial log.
  • Day 2: Port estimators to JS/WASM; build the replay dashboard with the countdown + confidence band + "imminent/unwarnable" state; add Ed25519 signing and the divergence-vs-official-feed alarm. Wire LoRa broadcast if hardware is up.
  • Day 3: Record a clean demo trace where a slow sag is warned ~9 min ahead and an air cut ~20 min ahead; polish judge view; write the "what is real" label table (LIVE/REPLAY/SIM); rehearse the 2.5-min script. Buffer for the inevitable sensor-noise tuning.

Demo script (2.5 min)

  1. (15 s) "Your phone dies in a blackout. This doesn't." Hold up (or show) the crank node.
  2. (45 s) Replay a power trace: lamp flicker frequency sags, CUSUM flags the onset, the dashboard counts 9:40 → 0:00; the buzzer/LED fires; the shed lands right at zero. Then replay a trip: the node honestly says "imminent — too fast to warn."
  3. (45 s) Replay an air trace: CO2 begins climbing, the ODE fit projects "22 min to 2000 ppm," countdown runs, alarm fires with margin to move people.
  4. (20 s) Flip the Directorate's official feed to "all normal" while the node screams — divergence alarm lights; "it catches them lying."
  5. (15 s) The label table: what's LIVE, REPLAY, SIMULATED.

Rubric mapping

  • Creativity: forecasting minutes-to-cut for air from an ODE and sensing the grid through light on a crank-powered node that outlives the cut — a fresh combination.
  • Technical: CUSUM + trend extrapolation + a fitted first-order CO2 ODE + signed mesh, each verifiable against traces with measured lead-time error.
  • Impact: a concrete countdown is directly actionable (fill water, move the frail, open manual air) and the resilience angle means it works during the emergency.
  • Presentation: the countdown hitting zero exactly as the cut lands is a clean, legible visual beat.

Differentiation

Closest overlap: Stratum p01 (phone-mic ENF hum + CO2 model, AMBER/RED tiers). New angles: (1) a numeric lead-time forecast for both power and air, not just a color tier; (2) the CO2 ODE time-to-threshold, which Stratum does not produce; (3) light-based sensing; (4) the decisive one — phone-independent, crank-powered hardware that survives the cut, directly attacking Stratum's weakness that its sensor is the phone that dies first.

Top 2 feasibility risks + mitigation

  • Hardware doesn't arrive / won't behave in 3 days. Mitigation: the Python/JS algorithm and replay dashboard are the graded core and need no hardware; the node is a clearly-labeled stretch. Never fake it on stage.
  • Flicker-based ENF is noisy under dim/shared lighting, hurting lead-time accuracy. Mitigation: fuse with brightness-sag and the CO2 channel; report a confidence band; validate lead-time error on replayed real ENF traces and show the number honestly.

Solo vs 2–4 person scoping

  • Solo: Python estimators + replay dashboard only, no hardware. Still a complete, demoable, differentiated submission.
  • 2 people: add the ESP32 + SCD41 live node and a real crank/solar demo.
  • 3–4: add the LoRa mesh relay between two nodes and the signed divergence-vs-official-feed alarm as a full sub-demo.

PROPOSAL 2 — "Equinox" ⚠️ crowded problem, see verdict

One-line pitch: A ration allocator you can't lie your way past: everyone spends an equal budget, market-clearing prices divide power/water/food, and the result is provably envy-free and efficient — with a hard survival floor underneath.

Problem restatement

Split scarce power, water, and food across levels "fairly." The unsolved part every competitor skips: levels will over-report need to grab more, and the Directorate's hand-divides are opaque and unaccountable. A real mechanism must (a) resist strategic lying about demand, (b) be provably fair (no level envies another's bundle), (c) stay efficient (no wasteful split), and (d) guarantee a survival floor regardless.

Concrete mechanism

Competitive Equilibrium from Equal Incomes (CEEI) via the Eisenberg–Gale convex program — the mechanism behind Spliddit and Wharton's course-allocation (Budish's CEEI), applied to rationing:

  • Give every resident an equal budget of B virtual tokens (a level's budget = B × its population).
  • Goods (kWh, L water, kcal) get market-clearing prices p. Each level buys the bundle maximizing its utility within budget.
  • The equilibrium is computed directly by maximizing Nash social welfare: max Σ_i people_i · log(u_i) s.t. Σ_i x_ig ≤ supply_g for each good g, with u_i a concave utility over the level's bundle. The maximizer is the CEEI allocation (Eisenberg–Gale duality gives the clearing prices as the constraint multipliers).
  • Properties that neither competitor provides: Pareto-efficient, envy-free, proportional, and approximately strategyproof in large populations — a single level can't move prices enough to profit by lying, so honest demand is a near-best response. That directly solves the over-reporting problem Stratum's water-filling assumes away.
  • Hard survival floor: add u_i ≥ floor_i constraints (fair division with guaranteed minimums). Floors are served first; CEEI divides only the surplus above them.
  • Fairness receipt: each level gets a signed statement of its budget, the clearing prices, its bundle, and an envy-free certificate (no feasible swap is Pareto-improving) — an auditable answer to Directorate opacity.
  • Benchmark head-to-head against Stratum's max-min water-filling and the Directorate's deepest-first, on the same scenario, reporting Nash welfare, envy count, worst-decile served fraction, and Jain's index.

Architecture + tech stack

  • Solver: Python + cvxpy (verified on PyPI) with its bundled free solvers ECOS/SCS for the Eisenberg–Gale program; numpy/scipy for scenario generation and the comparison metrics. The log-utility objective is concave → a clean, reliably solvable convex problem at this scale (tens of levels, 3 goods).
  • Frontend: Vite + vanilla JS + chart.js: allocation bars per level, the clearing-price panel, and an envy matrix heatmap (cell (i,j) = how much i would prefer j's bundle; CEEI makes it all ≤ 0).
  • Optional API: FastAPI if a live "re-solve on slider change" demo is wanted; otherwise precompute scenarios.

3-day build plan

  • Day 1: Eisenberg–Gale program in cvxpy with floor constraints; verify envy-freeness and feasibility on 3–4 hand-checkable scenarios; implement the comparison metrics.
  • Day 2: Implement Stratum-style max-min and Directorate deepest-first as baselines on identical inputs; wire the frontend (allocation bars, price panel, envy heatmap, metric table).
  • Day 3: Build a strategic-lying demo (a level doubles its reported need → show its payoff barely moves under CEEI but balloons under naive proportional split); fairness-receipt export; polish + rehearse.

Demo script (2.5 min)

  1. (20 s) "Fair isn't just a formula — it has to survive people lying." Show the three goods and the levels.
  2. (40 s) Run CEEI: allocation bars fill, prices appear, the envy matrix goes all-green (nobody envies anyone); the survival floor line holds under every level.
  3. (40 s) Side-by-side: Directorate deepest-first (deep levels starve) vs Stratum max-min vs Equinox — metric table shows Equinox with zero envy and competitive worst-decile.
  4. (30 s) The lying demo: a level inflates demand → under naive split it wins big; under CEEI its gain is ~nil. "You can't game it."
  5. (10 s) Export a signed fairness receipt.

Rubric mapping

  • Creativity: rationing as a strategyproof market with equal incomes — a genuinely different frame from max-min division.
  • Technical: a real convex-optimization mechanism (Eisenberg–Gale/Nash welfare) with proven envy-freeness and efficiency, plus the strategyproofness demo.
  • Impact: resistance to demand-inflation and an auditable receipt address the real failure modes of hand-divided rationing.
  • Presentation: the all-green envy matrix and the "lying doesn't pay" reveal are crisp, legible beats.

Differentiation

Closest overlaps: Stratum p02 (Fair-Share water-filling + life floors + worst-decile metric) and HollowSignal (per-level allocation comparison). New angle: both assume true demand and optimize a division rule; Equinox makes honesty near-optimal (strategyproof-in-the-large CEEI) and ships a mathematical envy-free + Pareto guarantee with an auditable receipt — properties neither competitor claims.

Top 2 feasibility risks + mitigation

  • Crowding — this is the most contested of my three problems. Mitigation: only pursue it with the CEEI/strategyproofness angle; a plain allocator here is dominated by Stratum and should not be built.
  • Solver edge cases (degenerate prices, zero-demand goods). Mitigation: add tiny Tikhonov regularization and demand floors; cvxpy + SCS handles the regularized problem robustly; validate on hand-checkable cases first.

Solo vs 2–4 person scoping

  • Solo: CEEI solver + static scenarios + envy heatmap + the lying demo. Complete.
  • 2: add live sliders (FastAPI re-solve) and the full baseline comparison.
  • 3–4: add multi-period allocation with carry-over debts (fairness over time, not just one shot) and the signed-receipt audit trail.

VERDICT on problem 2: Recommend against building it unless you commit to the CEEI angle. As a plain fair-divider it is squarely occupied by Stratum (strong, evidence-backed) and HollowSignal. CEEI is the only path to a sharp, defensible contribution here — and even then it competes hardest of my three. If the team wants the surest differentiated win, spend the effort on Proposal 3 instead.


PROPOSAL 3 — "CoolVault" ★ recommended lead pick

One-line pitch: Deep levels stay survivable by banking cold when power is spare and spending it when the wet-bulb climbs — a predictive controller that fights humidity, not just heat, and schedules a thermal battery against a shaky power budget.

Problem restatement

The deepest levels are hottest (geothermal influx + waste heat + poor ventilation) and last in line for the rationed cooling plant. The true danger at ~70 % humidity is wet-bulb temperature, not dry-bulb: above ~27.5 °C wet-bulb the body can't shed heat and people die. Stratum's own notes concede humidity is what makes the deep levels lethal. Simply dividing a cooling pool (what Stratum and HollowSignal do) ignores the two levers that actually help: when you cool and removing moisture. "Keep lower levels livable" means an operational controller, not just an allocation.

Concrete mechanism

A model-predictive controller (MPC) over a physical model:

  1. Thermal model — lumped-capacitance RC network per level: C·dT/dt = Q_geo + Q_people + Q_internal − Q_cool, with Q_geo the (roughly constant, depth-scaled) geothermal influx, Q_people ∝ occupancy, and Q_cool the applied cooling. Standard building-physics first-order model, parameters fit from any temperature log.
  2. Humidity mass-balance + wet-bulb: track moisture from people/infiltration vs dehumidification; compute wet-bulb from (T, RH) with psychrolib (GetTWetBulbFromRelHum, NREL/ASHRAE-validated — verified on PyPI). This is the real danger metric and the thing the controller actually minimizes.
  3. The "coolth battery": a chilled-water or PCM tank storing cold. State-of-charge is a decision variable — pre-charge it during power-surplus windows (night/off-peak, or whenever Proposal 1/2 say power is cheap) and discharge during peak-heat hours so lethal windows don't depend on live grid power.
  4. MPC optimization: over a receding N-hour horizon, decision variables are the cooling schedule, the dehumidification schedule, and tank charge/discharge. Objective: minimize person-hours above 27.5 °C wet-bulb + energy cost. Constraints: a time-varying power budget (scarce, from the ration), tank capacity, and plant limits. Solve as an LP/QP with cvxpy each step; re-solve as the forecast updates. Fallback if time-boxed: a greedy "pre-charge when spare, discharge above a wet-bulb setpoint, dehumidify first" heuristic still demonstrates the whole idea and is a 1-hour implementation.
  5. The key physical insight that beats pure cooling: at 70 % RH, lowering RH drops wet-bulb more per joule than lowering dry-bulb — so the controller prioritizes dehumidification, which no competitor models at all.

Architecture + tech stack

  • Core: Python + psychrolib (wet-bulb, verified) + cvxpy (MPC LP/QP, verified) or scipy.optimize.linprog for the fallback + numpy for the RC integration and scenario generation. All free/open.
  • Frontend: Vite + vanilla JS + chart.js (or Plotly) — stacked timelines of dry-bulb, wet-bulb vs the 27.5 °C lethal line, tank state-of-charge, and the power budget, with a live "person-hours saved" counter.
  • No hardware required — this is a modeling/control deliverable, which is why it's the surest 3-day win.

3-day build plan

  • Day 1: RC thermal model + humidity balance + psychrolib wet-bulb, integrated over a day for a deep level under a realistic power budget; validate the uncontrolled baseline crosses the lethal line. Build scenario generator (depth, occupancy, budget profile).
  • Day 2: Add the coolth tank and dehumidification as decision variables; implement the greedy heuristic first (guaranteed working), then the cvxpy MPC on top; compute person-hours over threshold for each.
  • Day 3: Baselines — Stratum static Fair-Share split and Directorate proportional, same inputs; build the dashboard (wet-bulb timelines, tank SoC, person-hours-saved counter); polish + rehearse. Buffer for MPC tuning; the heuristic is the safety net.

Demo script (2.5 min)

  1. (20 s) "Down deep it's the humidity that kills — and the cooling arrives when it's already too late." Show the lethal 27.5 °C wet-bulb line.
  2. (40 s) Uncontrolled / Directorate run: wet-bulb crosses the red line for hours; the person-hours counter climbs alarmingly.
  3. (50 s) CoolVault run on the same power budget: the tank pre-charges overnight (SoC rises), dehumidification kicks in, and at peak heat the stored cold is spent — wet-bulb stays under the line; counter stays near zero. Point to "dehumidify-first" doing the heavy lifting.
  4. (20 s) Side-by-side person-hours table: Directorate vs Stratum-split vs CoolVault.
  5. (10 s) "Same power. Same plant. Scheduling and drying the air is the difference between livable and lethal."

Rubric mapping

  • Creativity: treating cooling as a storage + dehumidification scheduling problem and targeting wet-bulb — a frame nobody else uses.
  • Technical: a real RC thermal model + psychrometric wet-bulb + an MPC (LP/QP) over a thermal battery, with the greedy fallback proving robustness.
  • Impact: measured person-hours-over-lethal-wet-bulb reductions on the same scarce power — directly the thing that keeps deep levels alive.
  • Presentation: the wet-bulb line held just under lethal while the tank drains is an unforgettable visual.

Differentiation

Closest overlap: Stratum p03 (divides a static cooling pool with rotating refuge rooms; metric = person-hours > 27.5 °C wet-bulb) and HollowSignal's heat scenario. New angle: Stratum allocates a fixed pool at each instant and measures the metric; CoolVault forecasts wet-bulb and actively controls it — time-shifting cold via storage, removing moisture via dehumidification, and optimizing against a varying budget. It can even sit downstream of Stratum's allocation as the control layer Stratum lacks, which makes it complementary rather than a clone.

Top 2 feasibility risks + mitigation

  • MPC tuning eats the clock. Mitigation: the greedy pre-charge/dehumidify-first heuristic is built Day 2 and already demonstrates the thesis; MPC is a strict upgrade, not a dependency.
  • Thermal/psychrometric parameters look arbitrary and judges doubt them. Mitigation: source Q_geo, C, and PCM capacity from published ranges, cite them on screen, and run a sensitivity sweep so the conclusion (storage + dehumidification cuts lethal person-hours) holds across parameters, not one lucky set.

Solo vs 2–4 person scoping

  • Solo: RC model + wet-bulb + greedy controller + two baselines + dashboard. Complete and strong.
  • 2: add the full cvxpy MPC and the sensitivity sweep.
  • 3–4: multi-level coupling (shared plant across levels, so cooling becomes a joint schedule) and a direct hand-off from Proposal 2's allocation as the time-varying budget input — the two projects compose into one system.

Cross-cutting recommendation

Build order if the team picks from my three: Proposal 3 (CoolVault) first — clearest open lane, no hardware risk, strong visual. Proposal 1 (Blackout Canary) second — differentiated by the air-ODE countdown and crank-powered resilience, with a solo-safe software-only floor. Proposal 2 (Equinox) only if you commit to the CEEI/strategyproofness angle; otherwise skip — Stratum and HollowSignal already own plain fair-division. Proposals 2 and 3 compose (CEEI budget → CoolVault's power input), as do 1 and 3 (Canary's cheap-power windows → CoolVault's pre-charge trigger), so a 3–4 person team could ship 3 as the spine with 1 feeding it.