(A) Task structure. Mice discriminate the location of a pole (anterior or posterior) during a sample epoch (1.3 s) and report the location using directional licking (left or right) after a delay epoch (1.3 s). An auditory go cue (0.1 s) signals the beginning of the response epoch. (B) Example behavioral data in 100 consecutive trials. Dots show individual licks. Blue, lick right; red, lick left. Circles indicate the first lick after the go cue (choice). In trials with early licks before the ‘go’ cue, choice licks occur late due to the timeouts (Materials and methods). (C) Flow chart of the task training protocol. See Materials and methods for details. Auto-assist programs (green box) evaluate mice performance continuously and assist mice whenever certain behavioral biases are detected. (D) Data from an example mouse undergoing task training in home-cage. Top, behavioral performance. Shaded areas indicate different phases of the training as in (C). During the delay epoch training, the red dash lines indicate delay duration increases. Bottom, fraction of trials in which the mouse licked before the go cue. After mice complete the task training protocol, experimenters examine the mice performance and initiate optogenetic testing protocol (indicated by the orange arrow in this example). (E) Behavioral performance of all mice in home-cage training (n = 32). Black dash line, criterion performance, 70% correct. (F) In a subset of mice (n = 4), the right whiskers were trimmed after home-cage training. Behavioral performance dropped to chance level (50%, black dash line) and did not recover. (G) Behavioral performance of all mice in manual training (n = 64). (H) Percentage of mice successfully trained in home-cage vs. manual training. Training is deemed successful if the mouse reached 70% correct criterion performance. (I) Number of trials performed per day in home-cage versus manual training. Bar plot shows mean and standard deviation across mice. Circles, individual mice. ***, p<0.001, two-tailed t-test. (J) Left, number of days to reach 70% correct criterion performance. Right, number of trials to reach 70% correct criterion performance. *, p<0.05; n.s., p>0.05, two-tailed t-test.