a, Left, example trajectories of one animal on sessions T1 to T5, on error trials (T5e) and on correct trials downsampled to the same number of trials as the error trials (T5d). Red parts of each trajectory indicate positions covered during the cue sampling interval, black indicates positions during runs from cue port to food cups, and grey shows positions from food cups back to the cue port. Right, polar plots showing distributions of head direction during the cue sampling interval (T1–T5, T5d and T5e, as indicated to the left). Values to the right indicate mean head angle relative to the centre of the cue port, designated as north (0°). b, Time course of instantaneous speed before, during and after cue sampling, averaged across 5 rats. Shading denotes s.e.m. T1 is shown at the top; T5, T5d and T5e at the bottom. For every 10-ms time bin during T2–T5, speed was compared with the corresponding bin at T1. Speeds were not significantly different from T1 at any time bin (q > 0.05; false discovery rate (FDR) corrected for multiple comparisons). Speed was not different at T5e and T5d. c, Mean head angle (top) and mean vector length for head direction (bottom) during the cue sampling interval (mean ± s.e.m. for all 5 animals). Neither head angle nor mean vector length changed significantly from T1 to T5 (repeated measures ANOVA: F(4, 16) = 0.44, P = 0.78 for mean angle; F(4, 16) = 0.13, P = 0.97 for mean vector length). There was also no change in these parameters on the error trials (T5e compared with T5d using two-tailed paired t-test: t(4) = 0.70, P = 0.52 for mean angle; t(4) = 0.18, P = 0.87 for mean vector length). d, Mean instantaneous speed (top), path length (middle) and run duration (bottom) for trajectories from cue port to food cups (left column) and from food cups to cue port (right column). None of these parameters changed significantly during learning (repeated measures ANOVA for time-points T1–T5; for cue port to food cups: F(4, 16) = 0.14, P = 0.97 for mean speed, F(4, 16) = 0.55, P = 0.70 for path length, F(4, 16) = 0.16, P = 0.95 for run duration; for food cups to cue port: F(4, 16) = 0.35, P = 0.84 for mean speed, F(4, 16) = 0.47, P = 0.76 for path length, F(4, 16) = 0.13, P = 0.97 for run duration). None of these parameters changed on error trials (T5e compared with T5d using two-tailed paired t-test; cue port to food cups: t(4) = 0.31, P = 0.77 for mean speed, t(4) = 1.87, P = 0.52 for path length, t(4) = 0.91, P = 0.42 for run duration; food cups to cue port: t(4) = 0.14, P = 0.89 for mean speed, t(4) = 0.50, P = 0.64 for path length, t(4) = 0.02, P = 0.99 for run duration). e, To check if changes in neural activity from T1 to T5 are associated with changes in body position, LEDs were attached to the back of 4 rats and LED positions were recorded from T1 to T5. Left, example trajectories of body position in one animal at different stages of learning. Red indicates body positions covered during the cue sampling interval, black indicates positions during runs from cue port to food cup, and grey show positions from food cup back to the cue port. Right, polar plots showing distribution of body direction (deflection from south) during the cue sampling interval (T1–T5). f, Cumulative body movement (top), mean body angle (middle) and mean vector length for body direction (bottom) during the cue sampling interval (mean ± s.e.m. of 4 animals). In the middle panel, body angle is shown as the absolute change in mean angle compared to T1, since different rats may turn in different directions. None of these parameters changed significantly from T1 to T5 (repeated measures ANOVA: F(4, 12) = 0.77, P = 0.57 for cumulative body movement; F(3, 9) = 1.06, P = 0.41 for mean angle; F(4, 12) = 1.11, P = 0.40 for mean vector length). g, Example recording showing changes in sniffing amplitude and frequency during cue sampling. A temperature sensor (thermocouple) was implanted in the right nostril to measure respiration (top). In each breathing cycle, inhalation is associated with decaying voltage output from the thermocouple, and exhalation with increasing voltage. Instantaneous sniff frequency was determined from the voltage change (bottom). Note that sniff frequency increased during cue sampling (between t = 0 s and t = 1 s) and when the animal approached the food cup. The food cup was reached at t = 3.8 s in the present example. h, Time course of sniff frequencyaveraged for 5 rats at time-points T1–T5 as well as on error trials (T5e) and correct trials down-sampled to the same number of trials (T5d). Shading denotes s.e.m. At time points T2–T5, sniff frequency was compared for every 10 ms bin with corresponding bins at T1. None of the comparisons were significantly different (q > 0.05; FDR corrected for multiple comparisons). Sniff frequencies between T5d and T5e were also not different. i, Mean sniff frequency during the cue sampling interval. Sniff frequency did not change during the course of learning (repeated measures ANOVA: F(4, 16) = 0.24, P = 0.91) or on error trials (T5e compared with T5d using two-tailed paired t-test, t(4) = 0.03, P = 0.97). j, Left, example traces showing position of the animal on non-cued control trials (T5n). Colours indicate positions during cue sampling (red), positions from cue port to food cups (black) and positions from food cups back to cue port (grey). Right, polar plot showing head direction distribution during the cue sampling period for the session shown on the left. Values on the right indicate mean head angle. The centre of the cue port is north, or 0°. k, Instantaneous speed on non-cued trials, averaged across 5 rats. Shading denotes s.e.m. Speed on non-cued trials (T5n) was compared at successive 10-ms bins with speed on corresponding bins of cued trials (T5). Differences were not significant at any time bin between 2 s before and 4 s after poke onset (q > 0.05, FDR corrected for multiple comparisons). l, Mean head angle (top) and mean vector length of head direction (bottom) during the cue-sampling interval. Neither head angle nor mean vector length was different from corresponding values on cued trials (two-tailed paired t-test, t(4) = 1.85, P = 0.13 for mean angle; t(4) = 1.99, P = 0.12 for mean vector length). m, Mean speed (top), path length (middle) and run duration (bottom) for trajectories from cue port to food cups (left column) and from food cups to cue port (right column). None of these parameters were different between cued and non-cued tasks (two-tailed paired t-test; cue port to food cup movements: t(4) = 0.16, P = 0.88 for mean speed, t(4) = 0.50, P = 0.64 for path length, t(4) = 1.03, P = 0.36 for run duration; food cup to cue port movements: t(4) = 0.21, P = 0.84 for mean speed, t(4) = 0.30, P = 0.78 for path length, t(4) = 0.44, P = 0.68 for run duration). n, Sniff frequency at the cue port on non-cued trials, averaged across 5 rats. Frequency on cued trials is shown as a reference. Shading denotes s.e.m. Sniff frequency was compared at successive 10-ms bins between T5 and T5n. Differences were not significant at any time between 2 s before and 4 s after poke onset (q > 0.05; FDR corrected for multiple comparisons). o, Mean sniff frequency during the cue sampling period was not different between T5 and T5n (two-tailed paired t-test, t(4) = 0.89, P = 0.43). p, Mean sniff frequency during the cue sampling interval in novel odour trials. Sniff frequency did not change over the course of trials with novel odours (repeated measures ANOVA: F(6, 18) = 0.77, P = 0.60).