Sub topic 10
Modeling Adaptation with a Few Lines of Code
What the model represents
This chapter assumes you know the basic idea of subjective well-being and can read simple Python. The model is a teaching tool, not a clinical or empirical model of real people.
A simple adaptation-level model separates three ideas:
- Baseline is a reference level of well-being before the current stimulus.
- Stimulus is the current change, such as a raise, a new purchase, or the removal of a problem.
- Adaptation level is the learned reference point that gradually moves toward the stimulus.
Felt well-being is represented as:
felt well-being = baseline + stimulus - adaptation level
At first, a positive stimulus is far above the adaptation level, so it produces a large boost. As the adaptation level rises, the same stimulus produces a smaller boost.
The update rule
At each time step, the adaptation level changes by a fraction of the gap between the current stimulus and the current level:
new level = old level + rate × (stimulus - old level)
The rate controls how quickly adaptation occurs.
| Rate | Meaning |
|---|---|
| Low rate, such as 0.1 | Slow movement toward the new reference point |
| Medium rate, such as 0.3 | Moderate adaptation |
| High rate, such as 0.8 | Fast adaptation |
The model assumes that the stimulus remains constant during each step. A step might represent a day, week, or another period. The time unit is up to the person using the model.
Running the simulation
def simulate(events, rate=0.3, baseline=5.0):
"""Toy adaptation-level model.
events: stimulus strength at each step (0 = nothing, 3 = a lasting improvement).
The adaptation level moves a fraction `rate` of the way toward the stimulus
each step. Felt well-being = baseline + stimulus - adaptation level.
"""
level = 0.0
felt = []
for event in events:
level += rate * (event - level)
felt.append(round(baseline + event - level, 2))
return felt
# A lasting improvement for six steps, then its removal for four steps.
print(simulate([3] * 6 + [0] * 4))The output is:
[7.1, 6.47, 6.03, 5.72, 5.5, 5.35, 3.15, 2.7, 2.91, 3.36]The baseline is 5.0. During the first six steps, the stimulus is 3, so felt well-being begins at 7.1 and gradually moves toward the baseline. The improvement becomes familiar.
When the improvement disappears, the stimulus becomes 0. However, the adaptation level is still elevated. The subtraction of that remaining level temporarily pushes felt well-being below the baseline. This is a contrast effect: the current situation feels worse because it is compared with a recently better reference point.
Interpreting the parameters
Changing rate changes the timing, not necessarily the final direction. With a low rate, the initial boost lasts longer. With a high rate, the adaptation level catches up quickly. If the stimulus stays constant long enough, the model predicts that felt well-being approaches the baseline because the stimulus and adaptation level become similar.
The model also treats the baseline as fixed. Real well-being can change because of health, relationships, income, stress, personality, and many other factors. The code does not estimate happiness, diagnose anyone, or prove that adaptation follows this exact curve.
> callout note > Use the model to reason about a mechanism. Do not treat its numbers as measurements of a person's actual happiness.
Changing the scenario
You can replace the event list with any sequence of stimulus values. For example, alternating 0 and 3 represents an improvement that appears and disappears. This may produce less adaptation than a constant stimulus because the reference point has less time to catch up.
Exercise
In the model, what happens if you increase rate from 0.3 to 0.8 while keeping the events unchanged?
Show answer
The adaptation level moves toward each stimulus more quickly. The initial boost fades faster, and the below-baseline contrast after removal usually appears sooner and may be stronger.