a Time course of rule selectivity of a representative M2 single-unit (the same single-unit shown in Fig. 5b, c) for ipsilateral condition. Rule selectivity was quantified by applying ROC analysis to the distributions of mean firing rates during pre-choice period in trials of Rule Switch-blocks of 1 step and 2 steps conditions (see Methods for details). Gray line represents a 95% percentile level estimated by shuffled data in which we randomly shuffled rule labels for trials (1 step or 2 steps conditions) before calculating the area under ROC curve. Error bar, SEM. b Same as in a, but for contralateral condition. c Population-averaged time course of rule selectivity in ipsilateral condition. Blue, saline solution. Red, CNO solution. Shaded bands, SEM. d Same as in c, but for contralateral condition. Shaded bands, SEM. e Comparison of rule selectivity between CNO and saline conditions and across three epochs in Rule Switch-blocks (1st epoch, 1–18th trials; 2nd epoch, 17–36th trials; 3rd epoch, 37–55th trials). See Methods for details of calculating rule selectivity in each epoch. A repeated measures two-way ANOVA (with epoch being a within-subject factor) was conducted for the ipsilateral condition with rule switches from 1→2 steps conditions. No interaction was found between CNO dose and epoch in the ipsilateral choice (1→2 steps rules) condition (P > 0.4). A significant main effect of CNO dose was detected (F1,1833 = 12.7, P = 3.7 × 10−4), but not for epoch (P > 0.7). Post hoc comparison using two independent samples t-test showed significant differences between saline and CNO solutions in 1st and 2nd epochs. No significant interaction or main effect was detected for other three conditions (i.e., ipsilateral condition with rule switches from 2→1 steps conditions, contralateral condition with rule switches from 1→2 steps conditions, and contralateral condition with rule switches from 2→1 steps conditions). ***P = 4.4 × 10−4. *P = 0.036. n = 437 and n = 195 single-units for saline and CNO conditions, respectively. Error bar, SEM. Source data are provided as a Source Data file.