Many organisms, from bacteria to human hunter-gatherers, use specialized random walk strategies to explore their environment. Such behaviors are an efficient stratagem for sampling the environment and usually consist of an alternation between straight runs and turns that redirect these runs. Drosophila larvae execute an exploratory routine of this kind that consists of sequences of straight crawls, pauses, turns, and redirected crawls. Central pattern generating networks underlying rhythmic movements are distributed along the anteroposterior axis of the nervous system. The way in which the operation of these networks is incorporated into extended behavioral routines such as substrate exploration has not yet been explored. In particular, the part played by the brain in dictating the sequence of movements required is unknown.We report the use of a genetic method to block synaptic activity acutely in the brain and subesophageal ganglia (SOG) of larvae during active exploratory behavior. We show that the brain and SOG are not required for the normal performance of an exploratory routine. Alternation between crawls and turns is an intrinsic property of the abdominal and/or thoracic networks. The brain modifies this autonomous routine during goal-directed movements such as those of chemotaxis. Nonetheless, light avoidance behavior can be mediated in the absence of brain activity solely by the sensorimotor system of the abdomen and thorax.The sequence of movements for substrate exploration is an autonomous capacity of the thoracic and abdominal nervous system. The brain modulates this exploratory routine in response to environmental cues.