(A, C, E) Upper panels show the posterior probability of decoded locations for path replays that occurred in the vicinity of the start position in the spatial alternation trials (VDLR, VDRL, NALR, NARL, DALR, DARL) (A), the visually guided trials (VDLL, VDRR) (C), and erroneous trials (E), centered on the start position and rotated according to the direction of the memory-guided goal. The replays were ordered by the location showing the maximum posterior probability. Values are indicated by color bars (right). Lower panels show that the posterior probability of the decoded location averaged across all path replays. Distance was centered on the start position and rotated according to the direction of the memory-guided goal. The shaded area indicates SD, green dots indicate the rat's physical location, and red lines indicate the start position. The schematic diagrams of the maze on the right show the start position (black filled circles) and rotation direction (solid line: towards the memory-guided goal; dotted line: towards the previous goal). Note that in the visually guided trials (VDLL, VDRR), the rats could get rewards at the previous goal but were always under spatial memory demand due to the task design, so the choice to go toward the memory-guided goal (i.e., the goal opposite to the previous goal) was defined as an erroneous response. (B, D, F) Path representation (the sum total of posterior probabilities of decoded locations) averaged across all path replays within future and past regions, defined from the start position to memory-guided/previous goals, for the trials shown in A, C, and E. Red bars indicate SD. (G–L) as for (A–F), but for path replays occurring within the stem. Distance was centered on the rat's physical location at the time of occurrence, rotated according to the direction of the memory-guided goal, and scaled according to the distance from the rat's physical location to a memory-guided goal. Green lines indicate the rat's physical location, and red lines indicate the memory-guided/previous goals. Future and past regions were defined based on the rat's physical location and the memory-guided/previous goals, respectively. *: p < 0.05, **: p < 0.01, ***: p < 0.001, n.s.: p > 0.05.