← home

2026-07-10

Letting a Model Set Your Goals: What the Literature Actually Says

Algorithmic goal-setting is the practice of letting a statistical model choose the size of a personal goal — the day's burpee count, or the length of a meditation sit. This article collects design lessons from two such systems: one has picked a daily burpee goal for around 18 months; a newer one picks the duration of each sit in a private meditation podcast. Both began with the same algorithm: a small logistic regression trained on the system's own outcome history, sweeping candidate goals and picking the one that maximizes expected value = P(completion) × size of the goal.

The design felt principled. It is also the one the relevant literatures most reliably warn against. The problem sits at the intersection of contextual bandits, dynamic pricing, mobile-health intervention research and habit science, and each field has already named the mistakes.

The core failure: greedy does not learn

A greedy EV maximizer only observes outcomes at goals it chose, so its estimate of the success curve everywhere else is pure extrapolation. The pricing literature calls this incomplete learning — a myopic price-setter can converge to the wrong price and stay there forever, because it stops experimenting (den Boer's survey of dynamic pricing and learning; Keskin & Zeevi). Bandit theory says greedy is only safe when the context varies enough to explore for free (Bastani, Bayati & Khosravi, "Mostly Exploration-Free Algorithms") — and a system that picks its own actions from its own model has exactly the opposite property.

A diagnostic from the burpee system's own data: it paid a $5 Beeminder penalty for weeks for missing a 4-days-per-7 target, while the model kept serving medium-hard goals at 50 to 65% odds every day. It was not learning its way out; it could not — and it did not know the penalty existed, because the dollars were not in its reward function.

Best practices, each with a source

1. Sample, do not argmax. Thompson sampling (Russo et al.'s tutorial; Chapelle & Li's empirical case) replaces "pick the best goal under the fitted model" with "sample plausible model weights from the posterior, then pick the best goal under the sample". Exploration falls out for free and shrinks as data accumulates. For an existing logistic regression, the Laplace approximation is about 40 lines: the L2-regularized fit is the posterior mean, and the Hessian diagonal gives the variance. This is the standard recommendation for tiny data (n < 100), and it is what HeartSteps deploys in production mHealth.

2. Constrain the curve to slope the right way. P(success) cannot genuinely increase with goal difficulty, but a noisy tiny-sample fit will happily invert it and then recommend something absurd. Clamping the difficulty coefficient non-positive (projected gradient — one line) is a free structural prior; the general tools are isotonic regression and shape-constrained GLMs.

3. Weight recent data more. Capability drifts — improvement is the point — so the demand curve the model estimates is nonstationary. Discounted and sliding-window bandits (Garivier & Moulines) translate to a one-line change: weight each observation's likelihood by γ^age (the systems use γ = 0.99 per day). Without it, stale "could not do it" rows suppress goals that are now feasible.

4. Question the objective before tuning the algorithm. Maximizing expected output today treats the habit like a revenue problem. The habit-formation evidence points the other way: Lally et al. 2010 found automaticity builds over a median 66 days (18 to 254), and that consistency of repetition predicted habit gains, while Wood & Rünger's review frames habits as context–response associations that need stable, repeated, rewarded execution. Wildly varying EV-optimal goals are the opposite of stable. Goal-setting theory (Locke & Latham) adds the nuance: specific, difficult goals beat "do your best" — but difficulty must track current ability, and maxing difficulty during skill acquisition backfires. The reconciliation: pick the biggest ask that is still a near-sure thing — maximize size subject to P(success) ≥ α — rather than maximizing size × probability.

5. If there is a weekly commitment, plan the week, not the day. The burpee system's Beeminder commitment is 4 hit-days per 7. That is a chance constraint on the week, and the binomial arithmetic is decisive:

Strategy Per-day odds P(≥4 hits in 7)
7 medium-hard days 0.65 ≈ 0.80 — pay the penalty one week in five
5 quality days + 2 easy/free days 0.90 ≈ 0.92 — and the quality days can be bigger

The week-level constraint independently derives what periodization and every autoregulated-training RCT (HRV-guided beats fixed plans) have said for decades: hard-easy structure outperforms constant medium-hard. Two unrelated literatures converging on one answer is about the strongest signal an n = 1 project produces. The bandit formalism, for the interested: rotting and recovering bandits — an arm that depletes with pulls and regenerates with rest.

6. Put the real costs in the reward function. The $5 penalty, the streak, the demoralization of a miss — if the optimizer cannot see them, it will cheerfully spend them. Commitment-device research (Bryan, Karlan & Nelson) treats penalties as information; a goal-setter that ignores its own commitment device is optimizing a different objective than the one being lived.

7. Calibrate the floor, and let it relax. The floor α = 0.8 is roughly principled. The nearest quantitative anchor is the "Eighty Five Percent Rule" (Wilson et al., Nature Communications 2019): optimal training difficulty for a learner sits around 85% success. Different domain, suggestive number. The more honest derivation: α should reflect the asymmetry between the cost of a miss and the cost of an easy day — and because miss costs compound early (streak collapse, the "what-the-hell" effect, self-efficacy erosion per Bandura), α should start high (0.85 to 0.9) and relax as the habit consolidates. A schedule, not a constant.

8. If the system pings the user, ration the pings. For anything that proactively re-offers (a shorter goal after a decline), the deployed state of the art is conservative: HeartSteps caps intervention dosage and clips its action probabilities; Duolingo's notification bandit penalizes recently-used prompts and models their "recovery". Burden is a measured, real cost — a system that floods its user with offers trains the user to ignore them.

9. A declined offer is not a failed attempt — the two must not share a label. (added 2026-07-12) The meditation system auto-generates a bonus episode after each logged sit; a bonus never played becomes a miss at day rollover. y = 0 then covers two different events: "started and abandoned" (a difficulty signal) and "never started" (a demand signal). Four fields have independently named this problem. Recommender systems call it the implicit-feedback problem — an unclicked impression is unlabeled, not negative (Hu, Koren & Volinsky), and scoring it as negative means learning from missing-not-at-random feedback; the general machinery is positive-unlabeled learning. Mobile health builds the split into the design: HeartSteps gates each decision point on availability and excludes unavailable points from outcome analysis entirely. Psychometrics settled it in 1974 — Lord opens with "omitted items cannot properly be treated as wrong."

The general remedy is a hurdle model (Cragg 1971): a demand stage, P(start | offered), trained on every offer, and a difficulty stage, P(complete | started, duration), trained on attempts only, so the monotone-clamped curve never sees a decline. There is a useful degenerate case: when starting reliably implies finishing — true for short guided sits, where mid-episode abandonment is rare — the difficulty stage is vacuous, and the single pooled model survives with its label reinterpreted. y means "accepted the offer", and every negative is a demand signal. Two hazards remain even then. Momentum features computed per offer (rolling acceptance rate, streak, previous outcome) stop measuring day-level consistency once dead bonus offers enter the denominator — a perfect one-sit-a-day practice trains as a coin flip — so day-level versions (any sit yesterday, sitting days per week) must be supplied alongside. And a single duration slope cannot express per-slot tolerance (20 minutes at 6am, 2 minutes at lunch); discovering a multi-slot equilibrium needs a session-index × duration interaction once each slot has data. The pooling rule underneath: "which session of the day is this" works as a feature while only the outcome distribution differs by slot; it breaks when the label-generating process differs by slot, which no feature can absorb. Partial pooling (Gelman & Hill) is the principled endpoint if per-slot curves ever earn their keep — at tens of rows it is theater (see below). A coda from habit science: Wood & Rünger treat habits as cue-specific context–response associations; a morning sit, a lunch sit and a bed sit are three habits with three cues, so per-slot bookkeeping matches the psychology. (Practice 8 already argues for rationing offers; this is what unrationed offers do to the data.)

What was deliberately not built

Deep RL, neural bandits, survival models for offer timing, change-point detection, Whittle indices — all of it is data-starved theater at n = 1 with tens of observations. The whole upgraded stack is a logistic regression, a Hessian diagonal, a Gaussian sample, a coefficient clamp, per-row weights and a binomial table. About 120 lines of TypeScript, no libraries.

The short version