Heater Playground
The room on the left is a simulation with constants you choose and the model never sees. Record some logs from it, train the four-weight model from the world models series on them, and the chart on the right shows how well it predicts a room outside the training range, next to the hand-written guess from the 101 post.
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
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
| weight | learned | true |
|---|---|---|
| room | 0 | -0.07 |
| outside | 0 | 0.07 |
| heater | 0 | 1.2 |
| bias | 0 | 0 |
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.
The simulator, the training loop and the model are the code from Learning the Heater From Its Own Logs, the third code post in the world models series. Four weights, gradient descent, nothing else. Everything runs in your browser.