Chapter 0
The Shower Problem
Why can't I just get the shower to 38 °C?
Chapter 0: The Shower Problem ↗
Hot! Cold! Hot!
Mika: Okay, confession. This morning I turned the shower knob, got boiled, turned it back, got frozen, and did that about six times.
June: Everybody does that! Old apartment showers are the worst.
Theo: But why is it hard? You want one number, 38 degrees. You have one knob. That should be easy.
Let's find out. Below is a shower with a long pipe between the knob and the shower head, like a real one. Water you mix at the knob takes a couple of seconds to travel up the pipe. You can watch the water's colour creep along it.
Your goal: get the water to 38 °C (the green band) and keep it there for 10 seconds straight. Drag the orange knob, or click it and use the arrow keys. The clock starts when you touch it.
Chapter 0: The Shower Problem ↗
How did it go? If you swung back and forth, over and under the green band, you're in good company. Look at the blue curve: it probably zig-zags like a nervous snake.
Is the shower broken?
June: I think the shower is broken. I set the knob to warm, and it keeps going hot anyway!
Theo: Hmm. Let's plot two things: what the knob asks for and what the head gives you. If it's broken they shouldn't match at all.
The dotted orange curve is the temperature your knob position asks for: the mix at the valve. The blue curve is what actually arrives. Slide the orange curve later in time and see if they line up.
Chapter 0: The Shower Problem ↗
June: Oh! With gentle turns, shifting the orange curve about 3½ seconds makes the broad wiggles nearly line up. Sharp turns do not match exactly.
Mika: …the water is delayed and smoothed! A knob movement is not simply copied 3½ seconds later.
That's the first clue. When you feel "too hot", you're feeling the knob position from a few seconds ago. By then you've already turned it hotter, so you turn it back, too far, and the cycle starts again.
Would trying harder help?
Mika: I've got it: I was too gentle! If I turn the knob faster whenever it's wrong, I'll fix it faster.
We built three robot hands to test ideas without getting wet. The normal hand turns the knob a little faster the more wrong the water feels, like most people do. The harder hand does exactly the same thing, twice as vigorously.
Predict first! Compared with the normal hand, what will the harder hand do?
Chapter 0: The Shower Problem ↗
Try all three. The harder hand thrashes between freezing and scalding. The patient hand sets the knob to about 51% (the right mix, worked out in advance) and simply waits. It wins easily.
Theo: So delay alone isn't the problem. The patient hand has the same delay and does fine. The problem is reacting to old news, too eagerly.
Mika: So "push harder when you're further off" is the wrong instinct? That's my whole personality.
June: But the patient hand cheated. It knew the right answer in advance. If the hot water tank cools down, or someone flushes a toilet, the right knob position changes and the patient hand won't notice.
That's the real puzzle. We need something that reacts (so it can handle surprises) but doesn't over-react (so it doesn't swing). Hold on to that thought. The whole course is about it.
What we know so far
What we figured out
- Having a goal (38 °C) and a way to act (the knob) isn't enough. How you react matters.
- A delay means you always feel old information. The shower isn't broken, it's late.
- Reacting harder to old information makes the swings worse, not better.
- Setting the knob once and waiting works, but only if nothing ever changes.
A tiny drone hovers perfectly still at 2 metres, in the wind, with no brain at all. It has the same problem we do. How does it solve it?