A, Forward velocity (in millimeters per second) during closed-loop trials (blue), replay trials (red), and closed-loop and replay trials with OA bath application (light green and dark green, respectively). The black lines represent the means. The average forward velocity is higher when OA is delivered (Kruskal–Wallis test, forward velocity: saline versus OA, df = 1, χ2 = 56.52, p < 0.001). B, As in A, except for the measured angular velocity (in degrees per second) for the different experimental treatments. OA triggered a tendency to turn right (Kruskal–Wallis test; angular velocity, saline vs OA: df = 1, χ2 = 75.17, p < 0.001). This tendency was more pronounced in replay than closed loop (Wilcoxon signed-rank test; angular velocity, closed loop + OA vs replay + OA: p < 0.001). C, Raster plot of the response of a unit to a visual stimulus in closed-loop trials (blue), replay trials (red), and closed-loop and replay trials with bath application of OA (light green and dark green respectively). D, The normalized mean firing rates for 14 units during closed-loop trials, replay trials, and closed-loop and replay trials with bath application of OA (from left to right). E, Projection of the closed-loop trials (blue), replay trials (red) and closed-loop and replay trials with OA bath application (light green and dark green, respectively) on modes 2 and 3 after SVD. The ellipses correspond to the 50% confidence interval. F, Distribution of the singular values across mode for the firing rate responses (closed-loop, replay without OA and closed loop, and replay with OA data) and its shuffled version (shuffled data). G, Euclidean distance from the closed-loop trials to the replay trials with or without OA application and the closed-loop trials with OA application. Application of OA and the behavioral control variable impacted the similarity between population responses to a visual stimulus (Kruskal–Wallis test: df = 2, χ2 = 13.49, p = 0.001). Population responses in replay trials with bath application of OA were more similar to closed-loop than replay trials without OA (Wilcoxon signed rank test, p = 0.02). ***p < 0.001. NS, not significant.