Sub topic 13
Tracking whether the swap is working
This chapter assumes you have already named your routine, isolated the cue, tested the reward, and written an if-then plan. Here you will learn how to check, with a few minutes of effort each day, whether the new routine is replacing the old one.
Why track at all
A habit swap is a small experiment. Memory is a poor judge of it. You tend to remember the dramatic days and forget the quiet ones, so a week with five successes and two slips can feel like failure. A simple record replaces that impression with counts.
Track two things:
- Cue events: how often the cue appeared.
- Responses: which routine you ran when it did.
Counting only the new routine hides a common problem. If the cue appeared four times and you used the new routine once, the swap is working 25% of the time, not "sometimes".
What to record
Keep each entry to one line. Record the date, whether the cue occurred, which routine you ran, and whether the craving went away. The last field matters most, because a replacement that runs but leaves the craving in place is not delivering the reward.
| Date | Cue occurred? | Routine run | Craving gone after 15 min? |
|---|---|---|---|
| Mon | Yes, 3 pm restless | New: walk and chat | Yes |
| Tue | Yes, 3 pm restless | Old: vending machine | Yes |
| Wed | No, meeting ran late | None | Not applicable |
| Thu | Yes, 3 pm restless | New: walk, no one to chat with | No |
Thursday is useful data. The walk alone did not satisfy the craving. The social contact may be the real reward, which points back to your reward experiments.
Computing a swap rate
The swap rate is the number of times the new routine ran, divided by the number of times the cue appeared. Days without the cue are left out of both numbers.
from dataclasses import dataclass
@dataclass
class Entry:
cue_occurred: bool
ran_new_routine: bool
craving_gone: bool
def summarize(entries: list[Entry]) -> dict[str, float]:
cued = [e for e in entries if e.cue_occurred]
if not cued:
return {"swap_rate": 0.0, "satisfaction_rate": 0.0}
swaps = [e for e in cued if e.ran_new_routine]
satisfied = [e for e in swaps if e.craving_gone]
return {
"swap_rate": len(swaps) / len(cued),
"satisfaction_rate": len(satisfied) / len(swaps) if swaps else 0.0,
}
week = [
Entry(True, True, True),
Entry(True, False, True),
Entry(False, False, False),
Entry(True, True, False),
]
print(summarize(week))The two numbers diagnose different problems:
- A low swap rate means the plan is not firing. Look at the if-then wording, the cue, or how much effort the new routine takes.
- A low satisfaction rate means the plan fires but the reward is wrong. Return to the reward experiments and test another routine.
Reading the pattern
Give the swap at least a week before changing anything, and change only one thing at a time. If you change the routine and the wording together, you will not know which change helped.
Practical tips
Watch for two traps. First, tracking can become its own chore, so use the smallest format that works, such as a note on your phone or tally marks on paper. Second, do not treat the numbers as a score of your character. They are feedback on the design.
Exercise
Over a week the 3 pm cue appeared 5 times. You ran the new routine 4 times, and the craving went away in only 1 of those 4. Compute the swap rate and the satisfaction rate, then say what you would change.
Show answer
The swap rate is 4/5 = 80%, and the satisfaction rate is 1/4 = 25%. The plan fires reliably, so the trigger is fine. The new routine is not delivering the reward. Go back to the reward experiments and test a different replacement, such as one that includes social contact. Leave the if-then wording alone.