The regression analysis in Figures 3E–3H used binary predictors coding the choice (top or bottom), second-step state (right or left) and trial outcome (rewarded or not), as well as the two-way interactions of these predictors (e.g., choice x second-step). In Figure 5A we used an additional binary predictor coding the state of the transition probabilities (top→ right / bottom→ left versus top→ left / bottom→ right), binary predictors coding the interaction of the transition probabilities with the choice and second step, and the transition on the current trial coded clockwise (e.g., top→right) versus counter-clockwise – i.e., whether the transition was common or rare. In Figure 5B we used a predictor which coded the state of the reward probabilities as −0.5, 0, 0.5 for the left-good, neutral and right-good states respectively, as well as the interactions of this predictor with the choice, second-step and transition on the current trial. As the subjects knowledge of the transition/reward probabilities is ambiguous in the period following block transitions where they change, these predictors were coded 0 in the 20 trials following such changes, and