Turn results into decisionsLesson 54 of 76 · 9 min
A policy can respond to new information
Compare an adaptive decision with a fixed decision using the information actually available.
A policy maps available information to an action. It differs from a fixed choice and from an impossible hindsight rule that sees the future. Specify when the signal arrives and what it reveals before allowing the policy to act.
In this example a noisy early signal is related to later demand through a shared latent condition. A fixed stock is compared with a policy that stocks more after a high signal. Neither policy can inspect realised demand before acting. Latent means that shared condition is not directly observed; the policy sees the early signal, not the condition or future demand.
Use matched simulated conditions to compare losses. Optimising a threshold on one batch and reporting its apparent performance on that same batch can overfit simulation noise. Hold out independent evaluation trials when selecting a policy from many candidates.
- Receive a noisy signal
- Apply a prespecified policy
- Evaluate in the same world
Would a policy that chooses stock after seeing final demand be a fair operational comparison?
Write a prediction (optional)
Seeded teaching simulation
Select Run Python below with the code unchanged.
A saved draft is open. To run the published example, open Tools and select Restore example. Recover draft brings your code back.
Execution error
Technical error details
Your result
Published example output
This result comes from the original Python. Your runs appear above. Build environment ↗
fixed expected loss: 17.441 P(shortage): 0.1726 signal policy expected loss: 16.021 P(shortage): 0.1447 Signal / demand correlation: 0.6
Read the first result
The adaptive rule sees the noisy signal, not final demand. Its usefulness depends on both signal quality and the action rule.
Try an edit
Replace signal = latent + rng.normal(0, 1, len(latent)) with signal = latent + rng.normal(0, 2, len(latent)). Select Run Python again. Compare Signal / demand correlation and the expected loss of the fixed and signal policies. The threshold stays fixed. What changes when the same policy receives a noisier signal?
Scope. The signal mechanism and policy are invented. Independent simulation evaluation does not establish real-world signal quality.
Try a fresh case
You test a hundred policy thresholds and select the lowest-loss one. What improves the performance assessment?
Need a hint?
Hint 1
Separate policy selection from policy evaluation.
Hint 2
Keep the information available at decision time fixed.