Introduction

We have the remarkable ability to learn complex series of temporally ordered actions, by grouping successive actions into integrated units, or chunks (Klapp, 1995; Lashley, 1951; Sakai et al., 2003; Verwey & Eikelboom, 2003). When we learn to drive or type, we tend to be slow and inaccurate at first, but with practice we press the clutch then shift the gear, or type letters in a word, all in one fluid and accurate motion. When we practice a new skill, it is thought that we initially retrieve and execute sequential actions one-by-one (Doyon & Benali, 2005; Wymbs et al., 2012), but eventually we learn to integrate series of once-distinct movements into tightly associated chunks (Fitts & Posner, 1967; Verwey & Abrahamse, 2012). Each chunk can then be retrieved from memory and executed as a single unit (Abrahamse et al., 2013; Fitts & Posner, 1967; Keele, 1968; Klapp, 1995; Logan et al., 2011; Logan & Crump, 2011; Ramkumar et al., 2016; Summers & Anson, 2009; Verwey & Eikelboom, 2003). The question remains, once we learn sequential skills, can we plan sequences of actions in a flexible way?

Voluntary actions are assumed to be controlled by two distinct processes: an “outer-loop” or cognitive processor that selects or retrieves the appropriate action and prepares it for execution (we refer to these steps collectively as “planning”), and an “inner-loop” or motor processor that executes the prepared action (“dual-processor” view, Abrahamse et al., 2013; “two-loop theory,” Logan & Crump, 2011). The chunking of learned sequential actions is assumed to allow an additional level of hierarchical control, where actions within a chunk are planned and executed efficiently as a single unit (Diedrichsen & Kornysheva, 2015; Logan & Crump, 2011; Verwey et al., 2015). Two observations align with this view. First, longer sequences often take longer to initiate (i.e., to begin the first action in the sequence) compared to shorter sequences (Garcia-Colera & Semjen, 1987; Klapp, 1995; Sternberg et al., 1978; Stöcker & Hoffmann, 2004; Verwey, 2003; Verwey & Eikelboom, 2003), an observation known as the sequence length effect. This observation is assumed to reflect the additional time required to plan more items prior to execution (Sternberg et al., 1978; Verwey & Eikelboom, 2003). Second, the sequence length effect typically decreases with practice (Klapp, 1995; Stöcker & Hoffmann, 2004; Verwey, 2003; Verwey & Eikelboom, 2003). This observation is attributed to chunking, which allows fewer units to be planned before execution. For instance, experienced typists were slower to type the first letter in long non-words (nonsense words) compared to short non-words, but they typed the first letter in long and short words with similar latency (Yamaguchi & Logan, 2014), suggesting that letters within words could be planned together as integrated units.

A key assumption in sequential action control is that chunking can ease the cognitive burden on sequence planning (Diedrichsen & Kornysheva, 2015; Verwey et al., 2015). This assumption naturally invites the question: how flexible is sequence planning when we switch between multiple learned (chunked) sequential actions? Action switching is ubiquitous in daily goal-directed behavior, such as alternating between shifting gears and steering when driving. It is well documented that switching between different goal-directed behaviors (i.e., “tasks”) entails slower and less accurate performance compared to repeating the same task, an observation known as a switch cost (for reviews, see Koch et al., 2018; Monsell, 2003). Much of the evidence for switch costs comes from single-response tasks (e.g., pressing a button) (Koch et al., 2018), although some recent work has also demonstrated switch costs for short (e.g., three-element) sequential actions (Brown et al., 2022; Rieger et al., 2017). It is not yet known how action switching impacts the planning efficiency of longer sequences relative to that of shorter sequences. Switch costs are thought to reflect extra time needed to overcome cognitive constraints when retrieving the current task, such as capacity limitations or the persistence of a previous task in memory (Gade et al., 2014; Kiesel et al., 2010; Pashler, 1994; Vandierendonck et al., 2010). According to this view, switching should place more demands on these cognitive control processes when planning longer sequences. Alternatively, chunking may help overcome the demands of switching, such that long and short sequences can be planned with similar efficiency when they switch or repeat. The former prediction implies that action planning efficiency is context-dependent, while the latter prediction implies that chunking allows stable planning efficiency across different contexts.

Chunking may also be aided by associating actions with their perceptual outcomes (“action effects”) (Rieger, 2004; Snyder et al., 2015). From an ideomotor perspective, planning movements depends on first anticipating the movement’s desired effects (Greenwald, 1970; James, 1890; Shin et al., 2010), such as which letters you want to appear when typing. When effects are fully predictable based on the preceding action (pressing the “A” key always makes “A” appear), the anticipated effect should prime the action (Land, 2018; Thomaschke et al., 2018). Thus, sequential action planning should be facilitated when perceivable effects predictably follow each action. Accordingly, the sequence length effect decreased over practice when the actions in each sequence consistently generated distinct tones as opposed to no tones or uniform tones (Stöcker & Hoffmann, 2004), possibly because anticipating the predictable tones speeded retrieval of the correct sequence. This finding suggests that chunking may be facilitated by the compatibility, or the degree of feature overlap, between actions and their predictable effects (e.g., Greenwald, 1972). For instance, actions and effects are spatially compatible when they occur in corresponding spatial locations (e.g., a left button press generates a stimulus on the left), in contrast to incompatible actions and effects (e.g., a left button press generates a stimulus on the right). Both single-response and sequential actions are speeded when they predictably generate spatially compatible effects compared to incompatible effects (Greenwald, 1972; Keller & Koch, 2006, 2008; Koch et al., 2004; Kunde, 2001; Kunde et al., 2004; Pfister, 2019), suggesting that compatible effects could be easy to anticipate prior to performing the action, which may in turn help retrieve the correct action. The question remains, does action-effect compatibility increase sequential planning efficiency by facilitating chunking? If so, spatially compatible action effects should reduce the sequence length effect.

The primary goal of the current study was to examine how action switching influences the relative planning efficiency of long and short sequences, in order to infer how action switching influences the planning of sequential chunks. The secondary goal was to examine the influence of spatial action-effect compatibility on planning efficiency. Participants first learned a short and a long action sequence. They then performed the sequences from memory, during which the action sequences either switched or repeated across trials, and each action generated spatially compatible or incompatible visual effects. We examined the latencies of sequence initiation and each sequential response, as well as error rates. We predicted, based on classical switch costs, that switching compared to repeating action sequences would increase the sequence length effect (greater initiation latency for long compared to short sequences), and that compatible (as opposed to incompatible) action effects would reduce the sequence length effect.

Method

Participants

Forty-two volunteers participated in the study via Prolific (prolific.co). Pre-screening criteria limited online recruitment to individuals who had upon registration with Prolific declared themselves to be between the ages of 18 and 35 years, right-handed, and to have normal or corrected-to-normal vision. After completing the study, participants were asked to verify their age, handedness, vision correction, and if they were neurologically healthy. Two participants were excluded because they did not report that they were neurologically healthy. This yielded a final sample of 40 participants, which included 15 females and a mean age of 24.8 years (SD = 5.5, range 18–35 years). Participants provided informed consent, and the study was approved by the internal ethics committee at the Institute of Psychology at RWTH Aachen University and was conducted according to tenets of the Declaration of Helsinki.

A sample size of at least N = 30 per experiment was estimated based on an a priori power analysis and two pilot experiments (see Appendix). Because theoretical perspectives on chunking, task switching, and action-effect compatibility do not make explicit assumptions about effect sizes, we instead estimated a minimum effect size of η2p = .32 based on previously reported sequence length effects [η2p = .38, η2p = .32, η2p = .33] (Garcia-Colera & Semjen, 1987; Stöcker & Hoffmann, 2004; Verwey & Eikelboom, 2003), previously reported effects of action sequence switching on sequence initiation latency [η2p = .52] (Brown et al., 2022), and previously reported effects of visual-spatial action-effect compatibility on action latency [η2p = .53] (Kunde, 2001), all within-subjects manipulations of the factor in question. Power analysis using an alpha level of α = .05 and a power level of 1 – β = .80 suggested a sample size of N = 29, which we increased to at least 30 per group in two pilot experiments (see Appendix) and to N = 40 in the main experiment (yielding an achieved power of .93).

Equipment and stimuli

The experiment was conducted online using Gorilla (gorilla.sc). Participants were required to complete the study on their own laptop or desktop computer. Participants pressed the “M”, “K”, and “O” keys with their index, middle, and ring finger, respectively, of their right hand (Fig. 1a), in four possible sequential orders: two possible long sequences (M-O-K-O-K-M, or O-M-K-M-K-O) or two possible short sequences (O-M-K, or M-O-K) (factor “Length”) (Fig. 1b). Half of the participants performed M-O-K-O-K-M and O-M-K, and the other half performed O-M-K-M-K-O and M-O-K. Thus, each participant performed one short and one long sequence, which we modelled on previous sequence-length effect paradigms to ensure that our task was of comparable difficulty (Stöcker & Hoffmann, 2004; Verwey, 2003; Verwey & Eikelboom, 2003).

Fig. 1
figure 1

Interface, sequences, stimuli, and trial procedure. a) The top panel shows an example keyboard interface, and the keys used to perform the sequences (note that the same keys could be used on a QWERTY keyboard shown here, or a QWERTZ keyboard). It was not possible to control or check whether participants used a different keyboard layout. If some participants used a non-standard keyboard layout, this would have lessened or negated the compatibility effect for those participants, resulting in underestimated compatibility effects. b) The middle panel shows which colors were used to cue each sequence, and it shows the corresponding action sequences. c) The lower panel illustrates the progression of a trial within the task (here a trial with a short sequence with compatible action effects)

At the beginning of each trial a fixation cross was presented in the center of the screen, followed by one of two possible colored circles, one yellow and one blue, approximately 5 cm in diameter, which served as imperative cues signifying the correct sequence of key-presses to be performed. A blue circle indicated the long sequence, and a yellow circle indicated the short sequence (Fig. 1b). When participants first learned the sequences (learning task), the digits “1”, “2”, or “3” appeared one at a time below the circle. These digits functioned as response cues, to prompt participants to press the “M”, “K”, or “O” keys, respectively. Once the participants learned the sequences, they performed them from memory following the presentation of a color cue. Additionally, each key-press resulted in the appearance of a black square in one of three possible positions in a vertical array along the center of the screen (see Fig. 1c), mirroring the (approximate) vertical alignment of the response keys. The squares were approximately 3 cm in height and were spaced about 4 mm apart.

Procedure

Learning and practice tasks

The participants first learned the key-press sequences and their corresponding color cues by performing a serial response-time task (learning task). Each trial began with a fixation cross presented for 1,500 milliseconds (ms), followed by the appearance of a blue or yellow colored circle. After 800 ms, the digit “1”, “2”, or “3” was presented on the screen below the colored circle and remained on the screen until the participant pressed the correct key. Each correct key-press elicited the presentation of another digit corresponding to the next key-press in the sequence, until the sequence was completed. The temporal interval between each correct key-press and the presentation of the next digit was set to 800 ms, in order to encourage participants to perform accurately and not too quickly (Stöcker & Hoffmann, 2004). Any incorrect key-press elicited an error feedback message (“Error”) presented for 1,000 ms, and ended the trial. Otherwise, a correctly performed trial ended with a “Correct!” feedback message presented for 500 ms. The colored circle remained on the screen until the sequence was correctly completed, or until an incorrect key-press was made (the circle disappeared before either feedback message was presented). The learning task comprised three blocks of 28 trials each, such that each block included 14 presentations each of the long and short sequence. In the third and final block, the digits “1”, “2”, and “3” were replaced with a question mark (“?”), which remained on the screen until the participant responded with the correct key-press. This was done to allow participants to start to practice performing the sequences from memory. All participants performed the learning task with 85% or greater accuracy (M = 98.18%, SD = 2.67).

After completing the learning task, participants completed a brief practice task to ensure that they could perform the sequences accurately from memory, and to practice the format of the upcoming main task of the experiment. Participants were required to perform each sequence correctly from memory three times in total in order to continue to the main task. Each trial began with a fixation cross, which remained on the screen until participants made the following response: participants were to continue the trial by pressing and holding down the “K” key. While the participant held down the “K” key, one of the two color cues (a blue or yellow circle) appeared after an interval of either 100 or 1,000 ms (pseudo-randomly varied across trials). This interval was varied because, as reported previously, when this interval was predictable participants tended to respond with temporal regularity rather than speed (see Keller & Koch, 2008). The cue remained on the screen until the participant released the “K” key. After releasing the “K” key, the participant then performed the sequence of key-presses. Participants were instructed, upon appearance of the color cue, to both release the “K” key and subsequently perform the sequence as quickly and accurately as possible. If participants made any incorrect response within the sequence, the trial ended and an error feedback message appeared (“Error”) for 1,000 ms, and the participants were then required to repeat the trial. If participants performed the sequence correctly, a “Correct!” feedback message appeared for 1,000 ms. Thus, if participants made no errors, they performed each sequence three times in a pseudorandom order. Each incorrect response resulted in a repeated trial. Participants performed each sequence correctly three times in succession after a mean of 4.15 trials (SD = 1.58, max = 9).

Main task: Performing from memory

Participants then completed the main task of the experiment, which involved performing the sequences from memory. The procedure during each trial was identical to that of the practice task, except that now each key-press response elicited the presentation of action effects. Each trial began with a fixation cross, which remained on the screen until participants pressed and held down the “K” key. While the participant held down the “K” key, one of the two color cues (a blue or yellow circle) appeared after either 100 or 1,000 ms (pseudo-randomly varied across trials). The cue remained on the screen until the participant released the “K” key, after which they performed the key-press sequence. Participants were instructed to perform as quickly and accurately as they could. Any incorrect key-press elicited an error feedback message (“Error”) presented for 1,000 ms, and ended the trial. Each correct key-press immediately elicited an action effect: a black square that appeared in either the upper-center, middle-center, or lower-center of the screen (see Fig. 1c). Each black square remained on the screen until the next key-press in the sequence was made, except for the final square, which remained on the screen for 500 ms.

The entire task consisted of eight blocks of 28 trials each, such that each block included 14 presentations each of the long-sequence cue and the short-sequence cue. Within each block, the number of action switches and action repetitions from trial to trial was equalized (factor “Switch”). The correspondence between each possible key-press and each possible action effect was either spatially compatible or spatially incompatible (factor “Compatibility”). In the case of spatially compatible action effects, the spatial contour of the action effect sequence followed the same spatial contour of the key-press sequence: the top-most key (“O”) elicited the top-most square on the screen, the middle key (“K”) elicited the middle square, and the bottom-most key (“M”) elicited the bottom-most square on the screen (top-middle-bottom keys → top-middle-bottom effects). In the case of spatially incompatible action effects, the spatial contour of the action effect sequence did not follow the same spatial contour of the key-press sequence. Two possible incompatible action-to-effect mappings were used: (1) top-middle-bottom keys → bottom-top-middle effects, or (2) top-middle-bottom keys →  middle-bottom-top effects. The two incompatible mappings were counterbalanced across participants, such that each participant was presented with only one incompatible mapping during the entire experiment. The eight task blocks always included four consecutive blocks of compatible action effects and four consecutive blocks of incompatible action effects, so that compatibility was consistent across consecutive trials, and action effects were always fully predictable. The order in which compatible and incompatible blocks occurred during the experiment (whether the compatible blocks preceded the incompatible blocks or vice versa) was counterbalanced across participants. The entire experiment lasted between 30 and 45 min.

Design and analyses

The design consisted of a 2 × 2 × 2 within-subjects factor structure with factors Length (short or long sequential action), Switch (switch or repetition), and Compatibility (compatible or incompatible action effects). Four dependent measures, three response-time measures and error rate, were calculated from the responses recorded during the main task. To examine sequence length effects, we examined “initiation time,” which was the time in milliseconds from the onset of the color cue (the colored circle) to the onset of the participant’s release of the “K” key (see Fig. 1c). We interpret initiation time to include the time required to retrieve the correct action sequence and to prepare and initiate the action (see Keller & Koch, 2008). We also examined “start time,” which was the time in milliseconds from the onset of the participant’s release of the “K” key to the onset of the first key-press in the sequence (see Fig. 1c). We additionally examined “inter-response time,” which was the response time in milliseconds for each of the individual key-presses in the sequence other than the first key-press (the time from the onset of a previous key-press in the sequence to the onset of the current key-press, for key-presses 2 and 3 in the short sequence, or key-presses 2, 3, 4, 5, and 6 in the long sequence; see Fig. 1c). The mean of all inter-response times in a sequence was interpreted as the mean time required to execute an individual response in the sequence. Finally, “error rate” was calculated as the percentage of trials in which the sequence was performed incorrectly. The first trial of each block was excluded from the above calculations, and all trials in which initiation time, start time, or inter-response time differed from their respective means (excluding trial 1 of each block) by more than three standard deviations were excluded from further analysis. All response time variables additionally excluded trials in which the sequence was performed incorrectly and all trials immediately following incorrect sequence performance.

For each dependent variable, a within-subjects ANOVA with the described 2 × 2 × 2 factor structure was run. Results from each ANOVA are reported in Table 1, and marginal/cell means are reported in Table 2 with associated standard error and 95% confidence intervals. Post hoc test p values were adjusted for familywise comparisons using the Tukey method. In addition to partial and generalized η2, we report Hedges’s grm for pairwise comparisons (notated as “grm”), which is a variation of Cohen’s d for correlated samples that gives a less biased estimation of population effect size (Lakens, 2013). Data processing and statistical analyses were performed in R version 4.1.3 using the afex and emmeans packages.

Table 1 ANOVA summary table per dependent variable
Table 2 Pairwise comparisons per dependent variable

Results

Initiation time

A main effect of Length, a Length-by-Switch interaction, and a Length-by-Switch-by-Compatibility interaction (see Table 1) indicated longer initiation times for long sequences compared to short sequences in Repeat but not Switch trials (Length-by-Switch interaction), and this pattern was more pronounced in the incompatible condition compared to the compatible condition (three-way interaction; see Fig. 2a). In Repeat trials, initiation time (ms) for long sequences exceeded that of short sequences, and this difference was greater in the incompatible condition compared to the compatible condition (see Table 2). In Switch trials, the difference between long and short sequences was relatively small in both the incompatible condition and in the compatible condition (Table 2). A pilot experiment also found marginally greater initiation time for long sequences in Repeat trials (a marginal Length-by-Switch interaction; see Appendix Table 3, Fig. 4). Thus, repeating a long sequence prolonged initiation time, particularly when actions and effects were incompatible.

Fig. 2
figure 2

Initiation time, Start time, and Error rate. a) Effects of Length (6 = long sequence, 3 = short sequence), Switch (Repeat = sequence repetition, Switch = sequence switch), and Compatibility (Compatible = spatially compatible action effects, Incompatible = spatially incompatible action effects) on initiation time (ms = milliseconds). b) Effects of Length and Switch on start time. c) Effects of Length and Switch on error rate (percent incorrect trials). In all panels (a, b, and c) marginal means are plotted and error bars represent 95% confidence intervals

Start time

A main effect of Length and a Length-by-Switch interaction (see Table 1) indicated longer start times for long sequences compared to short sequences in Repeat but not Switch trials (see Fig. 2b), mirroring the initiation time results (above). In Repeat trials, start time (ms) for long sequences exceeded that of short sequences (see Table 2). In Switch trials, the difference between long and short sequences was relatively small (Table 2). This result was replicated in both pilot experiments (see Appendix Tables 3 and 4 and Fig. 4).

Mean inter-response time

A main effect of Length (see Table 1) indicated longer mean inter-response time (ms) for long sequences compared to short sequences (see Table 2). This result was replicated in both pilot experiments (see Appendix Tables 3 and 4).

Error rate

A main effect of Length and a Length-by-Switch interaction (see Table 1) indicated higher error rate in long sequences compared to short sequences, and this difference was greater in Repeat trials compared to Switch trials (see Fig. 2c), mirroring the initiation time and start time results (above). In Repeat trials, error rate (percent incorrect trials) for long sequences exceeded that of short sequences (see Table 2). In Switch trials, the difference between long and short sequences was smaller (Table 2).

In addition, a Length-by-Compatibility interaction (Table 1) indicated higher error rate for long sequences compared to short sequences in the compatible condition, and this difference was smaller in the incompatible condition (see Table 2).

Inter-response time chunking

To examine how participants chunked the long sequence, visual inspection of each response indicated longer inter-response time and higher error rate on the fourth response in the long sequence (see Fig. 3a and b), suggesting that participants chunked the long sequence into two halves (Bo & Seidler, 2009; Sakai et al., 2004; Verwey & Eikelboom, 2003). We then compared the first half of the long sequence to the short sequence (both equal in length) by calculating the ratio of the start time to the mean of inter-responses 2 and 3 (response times within a chunk) in both long and short sequences. Larger “chunk” ratios are assumed to indicate response time speeding due to sequential priming within a chunk (Bo & Seidler, 2009; Verwey & Eikelboom, 2003). A 2 × 2 × 2 ANOVA on chunk ratios (with the same fixed-factor structure) indicated a Length-by-Switch interaction (F(1,39) = 18.57, MSE = 0.15, p < .001, η2G = .015, η2p = .32). In Switch trials, the chunk ratio of short sequences exceeded that of long sequences (short: M = 1.28, SE = 0.129, 95%CI = [1.024, 1.55]; long: M = 1.13, SE = 0.118, 95%CI = [0.891, 1.37]; difference = 0.155, SE = 0.0416, t(39)= 3.717, p = .0034, grm = .18) – this result was also found in both pilot experiments (see Appendix Results). In Repeat trials, the chunk ratio of long sequences exceeded that of short sequences (long: M = 1.24, SE = 0.124, 95%CI = [0.993, 1.49]; short: M = 1.03, SE = 0.087, 95%CI = [0.853, 1.21]; difference = 0.214, SE = 0.068, t(39)= 3.144, p = .0161, grm = .27) (see Fig. 3c). No other statistically significant effects were found. These results suggest that participants executed the first half of the long sequence more slowly than the short sequence when switching, but they executed the first half of the long sequence more quickly than the short sequence when repeating the same sequence.

Fig. 3
figure 3

Inter-response time chunking: Inter-response times, Error rates, and Chunk ratios. a) Mean response latencies for all responses in long and short sequences (6 = long sequence, 3 = short sequence) (init. = initiation time, start = start time, numbers 2–6 = inter-responses 2 through 6 in long sequences, numbers 2–3 = inter-responses 2 through 3 in short sequences) (ms = milliseconds). b) Error rate (percent incorrect responses) for all responses (note that initiation is not included because it was always performed correctly) for long and short sequences. c) Effect of Length (6 = first half of the long sequence, 3 = short sequence) and Switch (Repeat = sequence repetition, Switch = sequence switch) on mean chunk ratio (start time divided by the mean of inter-response times 2 and 3). Here, marginal means are plotted. In all panels (a, b, and c) error bars represent 95% confidence intervals

Discussion

Summary of main findings

The first goal of the current study was to examine whether switching from one action sequence to another lengthens the time needed to plan longer (compared to shorter) sequences in advance of execution (increased sequence length effect). Contrary to this prediction, we observed that sequence repetition increased the sequence length effect, compared to switching. This result was consistent in both response time and error measures, and it was replicated in two pilot experiments (see Appendix), attesting to its reliability. When participants repeated long sequences: (1) they took longer to initiate the sequence, (2) they took longer to make the first response in the sequence, and (3) they made more errors, all in comparison to repeating short sequences. No differences in the above response latencies or error rates were detected between long and short sequences when switching. The pattern of inter-response times suggested that participants chunked the long sequence into two units. When participants switched action sequences, they were relatively slower to execute elements within the first chunk of the long sequences. These results suggest that repetition may prolong advanced planning and switching may prolong execution of long sequences.

The second goal was to examine whether action-effect compatibility speeds advanced planning (reduces the sequence length effect). In line with this prediction, spatially compatible (compared to incompatible) action effects reduced the sequence length effect but specifically during sequence repetition. We suggest that anticipating the compatible effects may have helped overcome the increased planning demands of repeating long sequences.

Action sequence switching and sequence length

Participants appeared to be slower and less accurate when planning longer sequences that they had just performed. This result implies that repetition imposes efficiency and accuracy costs on long relative to short sequences. On the one hand, this finding is surprising given that an action that has just been performed may linger in working memory (Gade et al., 2014; Kiesel et al., 2010; Klapp, 1995; Vandierendonck et al., 2010), and should therefore be easier to plan. On the other hand, the finding could be explained if we assume that (1) the long sequence was chunked into multiple units, and (2) only the final chunk remained available in working memory after the long sequence was just performed (a recency effect). This final chunk may be a source of conflict, because it is incorrect as a starting chunk, but it is still relevant to (a part of) the current sequence to be performed. This scenario may be similar to a “partial repetition cost” in a task-switching paradigm: people are typically slower and less accurate when some but not all features of the previous task carry over to the current task, compared to when all features of the current task are different from the previous task (Brown et al., 2022; Schacherer & Hazeltine, 2022; Weissman et al., 2023). In the current study, additional planning time may have been needed to resolve an inter-chunk conflict, possibly because the still-relevant final chunk is difficult to inhibit while retrieving the first (correct) chunk (for reviews, see Koch et al., 2018; Monsell, 2003). In contrast, when switching to a different sequence (whether long or short), a lingering memory trace of the previous sequence should create comparatively less conflict, because the previous and current sequences are independent. This interpretation aligns with the possibility that there are general constraints on the number or size of chunks that can be maintained in working memory (see, e.g., Klapp, 1995; Logan et al., 2011; Palmer & Pfordresher, 2003). Both response latencies and error rates were highest overall for long, repeated sequences, suggesting that repetition did not simply speed the short sequences, but instead may have interfered with accurate retrieval of the long sequence. Thus, we hypothesize that if the long sequences were encoded as two distinct planning units (chunks), repeating the long sequence may have required a “partial repetition” from one chunk to another.

An additional explanation for the results is that switching was beneficial for planning long sequences, because planning the second chunk could be postponed until sequence execution. Participants may have shown lower chunk ratios in the long (compared to short) sequences during switch trials because they executed the first chunk more slowly in order to allow time to plan the second chunk. In this case participants would only need to retrieve the first chunk of the long sequence before execution, which would explain the similar pre-execution latencies (initiation and start times) for short and long sequences when switching. This interpretation aligns with the notion of independent processors for planning and executing action sequences (Abrahamse et al., 2013; Logan & Crump, 2011). These findings further suggest that the two processors may work together flexibly, dynamically adjusting whether the current sequence is planned in advance or incrementally, based on current constraints.

In general, slower and less accurate performance when repeating compared to switching an action could resemble inhibition of return (IOR), or a tendency for attention to be diverted away from a recently attended task or object. IOR effects are often observed in tasks that involve responding to sudden spatial stimuli (Dukewich, 2009; Klein, 2000; Lupiáñez et al., 2006). Interestingly, recent work suggests an IOR-type effect when retrieving recently read words (Langerock et al., 2021). This work raises the possibility that phenomena similar to IOR might occur when performing motor sequences from memory. Here we observed that repetition was detrimental to longer compared to shorter sequences, which would speak to a length-specific rather than a general IOR effect. Further work could examine whether and how IOR phenomena occur in sequence production.

The findings here document an influence of trial-to-trial transitions on the sequence length effect. Note that the current results cannot specify whether this influence was due to switching to a different sequence or switching to a different sequence length, because all switch trials were also length switches. The results here nonetheless show that the sequence length effect changes as a function of repetition versus switching in general, which could be due to a switch of the length or sequence identity dimension, or both. This suggests that sequence planning may flexibly adjust to the cognitive demands imposed by the current transition. Previous work has documented sequence length effects across different paradigms in which short and long sequences are either interleaved (Stöcker & Hoffmann, 2004; Verwey, 2003; Verwey & Eikelboom, 2003; Yamaguchi & Logan, 2014) or blocked (Garcia-Colera & Semjen, 1987; Klapp, 1995), suggesting that the effect on average may not necessarily depend on switching or repetition. Rather, the results reported here may help shed light on the trial-to-trial dynamics of the sequence length effect.

It is also important to note that the results reported here may not reflect highly practiced sequential performance, such as typing a word (Yamaguchi & Logan, 2014). Although participants here showed relatively high accuracy, they may not have had enough practice (42 learning trials per sequence) to achieve the degree of motoric fluency that was evident after 60 trials (Stöcker & Hoffmann, 2004) or 500+ trials per sequence (Verwey, 2003; Verwey & Eikelboom, 2003). Further research could examine whether increased practice reduces repetition costs or switching benefits when planning long sequences.

Spatially compatible action effects and action sequence switching

In line with our prediction, spatially compatible (compared to incompatible) action effects reduced the sequence length effect, but specifically during sequence repetition (the sequence length effect was detected only in repetition trials). The results of Pilot Experiment 1 also suggested that compatibility reduced the sequence length effect (Appendix, Table 3, non-significant trend toward a Length-by-Compatibility interaction). We based this prediction on the notion that the ability to anticipate the spatially corresponding “visual” sequences may help to prime sequence retrieval (James, 1890; Koch, 2007; Shin et al., 2010) and thereby speed sequence initiation (Stöcker & Hoffmann, 2004). Compatibility may have reduced the sequence length effect in repetition trials by the same means: participants may have overcome increased planning demands of repeating long sequences by using the anticipated compatible visual effects to retrieve the correct sequences (Greenwald, 1972; Hommel et al., 2001). On the other hand, compatible action effects also increased error rates for long compared to short sequences. We speculate that compatible action-effect associations took time to learn, such that anticipated effects did not reliably prime accurate responses until later trials.

The observation that action-effect compatibility influenced initiation time (the time to lift the hand from the home position) but not start time (the time to press the first key of the current sequence) additionally supports a distinction between different processes that occur prior to execution (Diedrichsen & Kornysheva, 2015; Klapp, 1995; Rosenbaum et al., 1987; Verwey et al., 2015). Visual-spatial effect anticipation may have facilitated selection, enabling participants to retrieve the correct sequence in terms of its visual-spatial coordinates. This finding is consistent with previous proposals that stimulus-response compatibility and other features of movement outcomes are relevant to selecting the appropriate movement, i.e., retrieving and maintaining in short-term memory the perceptual or symbolic coordinates of the upcoming movement (e.g., Klapp, 1995; Verwey et al., 2015). Subsequent processes involved in programming the movement, such as specifying the movement parameters (e.g., Verwey et al., 2015), may have occurred after the perceptual coordinates were successfully retrieved, although evidence suggests that effect anticipation can also influence preparatory and execution processes that follow response selection (Kunde et al., 2004; Stöcker & Hoffmann, 2004).

Conclusion

We here addressed how flexibly performers plan sequential actions when switching between multiple sequential actions. The results suggest that participants were slower to pre-plan longer sequences that they had just performed, but slower to execute long sequences after performing a different sequence. We hypothesize that performers may need to overcome interference between multiple chunks when repeating long sequences, and they may partially postpone planning until execution when switching. The findings suggest that planning and execution can be coordinated flexibly: performers may dynamically adjust whether planning takes place ahead of or during execution, based on current constraints. Furthermore, although task-switching behavior has been classically understood as costly, we here show evidence that repetition can be costly, and switching could be beneficial, when the task involves a longer action sequence that has been chunked into multiple planning units.