SmokeFree

Planner simulation

The quit planner run on six sample smokers from the day they save a plan. Pick a scenario and a smoker to see their days.

The smokers reach quit day on day —. Together they smoke — cigarettes.

Loading the simulation…

Every sample smoker

Over all simulated days of the scenario. First cigarette is the average time of the day's first one while cutting down. Pick a row to see that smoker's days below.

SmokerQuit dayCigarettesDays overFirst cigaretteDay starts

Daily target

What the planner allows a day. None while it learns, and zero from quit day.

Cigarettes smoked

What the smoker smoked each day.

Each day

A row a day, by the clock. Dots are cigarettes and ticks the times the planner allows one. The dashed line is where the smoker's own day starts.

How the planner works

The planner answers one question at any moment: what may this user smoke now? It works the answer out afresh each time from the saved plans and every logged cigarette. It uses whole numbers and never reads the clock itself, so the same log always gives the same answer on any platform.

The user's own day

A day starts in the middle of the user's quietest hours, usually while they sleep, not at midnight. Cigarettes after midnight count towards the evening before, and a night worker's shift is one day. Without a clear quiet time, the day starts in the early morning.

Learning the habit

A quit plan first learns when in the day the user smokes, from a few days with cigarettes. Days logged before the plan count, so someone who tracked first can start cutting down at once. The habit is a profile of the day in ten-minute steps, smoothed and mixed with an even share across waking hours, so a short or uneven history still gives a sensible day. Each day counts the same, however much was smoked, and the habit stays fixed for the whole quit attempt.

The pace

The planner keeps a level: how many cigarettes a day the user is at, starting from what they have smoked lately. Every day, the level drops by a share of itself, set by the plan's difficulty from Easier to Harder, and never by less than a small minimum, so the last few cigarettes don't drag on. After a day over target, the next cut is half as big but never zero. Today's target is the level rounded to whole cigarettes, and quit day comes when the level drops low enough.

The level never goes up, so the target never climbs and every quit plan reaches zero. A plan with a fixed date picks the cut that reaches zero on that date, allowing at least one cigarette a day until then. A new plan or a new difficulty during a quit attempt carries on from today's level, and a new difficulty starts with the next day's cut.

Shaping the day

Today's cigarettes are spread over the day the way the user usually smokes: more in the morning for a morning smoker, more at night for a night worker. As the level falls below the habit, the day moves towards even spacing and the first cigarette moves later, as in scheduled smoking. Each cigarette is allowed at the middle of its share of the day, with a minimum gap after the one before. A skipped cigarette is still allowed later in the day, so the day's target holds however the day starts.

Today's status

From the day's allowed times and the cigarettes logged, the planner tells the user whether they can smoke now, when the next cigarette is, whether that's all for today, or how far over today's target they are. A cigarette smoked before its time takes the next allowed time, which then shows as used. The whole quit attempt is replayed from its first day each time, which takes well under a millisecond.

After quit day

The target stays at zero. A day without cigarettes counts towards the smoke-free days, and a cigarette is a slip, not a new start: the plan stays at zero and the next day is a new smoke-free day.

Suggestions

The planner never changes the pace on its own. After three days in a row over target, it offers one step slower; after three days in a row at four fifths of the target or less, one step faster. Only days at the current pace count, and each offer shows the quit day it would give, from the next day's cut. If neither comes up in the first week, it asks on day 8 how the pace feels. The user decides, and can put an offer off for a week.

When three or more of today's allowed cigarettes are still open, it asks whether some weren't logged, except on the day the plan was set up. After quit day, cigarettes on 3 of the last 7 days bring an offer to start a new plan.

What can be tuned

The planner's settings, as written in the app's code.

AreaSettingValue