The second GLM was constructed to directly compare contrasts of search evidence and foraging choice value difference with each other. This model included search evidence (see below), foraging choice value difference as well as costs and reaction times. During the decision stage it included the value difference between both options, as well as the reaction time. The time courses were derived from region-of-interest (ROI) analysis, calculating a mean time course within a ROI in each subject individually. The ROIs’ coordinates were set in MNI space (spheres of a diameter of three voxels, except the ventral striatum where the diameter was two voxels) and then transformed to individual subject space by using the same linear registration as in the whole brain group analysis. Further details of vmPFC and ventral striatal ROIs are provided in Fig. S3, and further details of BOLD effects in ventral striatum and ACC are shown in Figs. S6 and S9. We then oversampled the time course by 10 and created epochs from the beginning of an event onward and applied a GLM to every pseudo-sampled time point separately. By averaging the β weights across participants we created the time courses shown (S.E. calculated between participants). For the slope estimate we oversampled by a factor of 20 to increase robustness of such estimates. Slopes were estimated using polynomial curve fitting on an interval of 6 s after event onset until each individual subject’s signal peaked. The GLMs used in constructing the time series during foraging included the encounter value, the absolute weighting used to generate it (Eq. S2), the search value, and the search cost (the factors that are illustrated in Figs. 2, E and F, and 3A). The subsequent decision-related time series were based on GLMs including chosen and unchosen reward magnitudes and probabilities and the search value from the preceding forage (the factors that are illustrated in Figs. 2H and 3C). We conducted a psychophysiological interaction (PPI) analysis (33) to investigate functional connectivity between ventral striatum and ACC. For this we generated a demeaned BOLD time-course regressor (from the ventral striatum) as well as an interaction term with the demeaned and convolved psychological regressor (search cost) separated according to choice, to generate an interaction term of the physiological and psychological regressor when search was chosen. We entered those regressors together with the other psychological regressors separated for choice into a FEAT whole-brain analysis.