1. The room

These are the constants the model is not told. The hand-written guess from the 101 post assumes a leak rate of 0.10 and a heater power of 1.5.

2. Record logs

no logs yet
Press Record. A thermostat with a random setpoint runs the heater in rooms with outside temperatures between 2 and 12 degrees, and every state, action and next state is written down.

3. Train

weights at zero
four-weight modellearnedtrue
room0-0.07
outside00.07
heater01.2
bias00

4. A room it has never seen

Pick conditions outside the training range and watch the three predictions diverge. The real room includes draughts, so it jitters; the models do not.

Real room Learned model Hand-written guess
Show as a table
stepreallearnedguess

The simulator, the training loops and the models are the code from Learning the Heater From Its Own Logs and Latent State Is the Fields You Never Logged, the third and fourth code posts in the world models series. Four weights and gradient descent for the sealed room; thirteen weights, one private field and the same gradient descent run backwards through each episode for the room with the door. Everything runs in your browser.