(A) We align with previous definitions by identifying roaming/dwelling behavior through a Hidden Markov Model of the linear and angular speed, averaged in 10 s windows, thus splitting each trajectory into two states: a low speed, high angular speed state (dwelling, blue), and a high speed, low angular speed state (roaming, orange). (inset) Example 5 minute centroid trajectories for each state. (B) In centroid-based analysis, the dwelling state exhibits a larger fraction of reversals vs roaming. We identify forward and backward motion using the angle between the centroid velocity vector and the tail-to-head angle obtained by averaging centerline angles: Δψ < π/2 for forward locomotion, Δψ > π/2 for backwards. (C-F) Posture analysis reveals that the centroid characterisation of roaming and dwelling behavior is incomplete. (C, left) Roaming worms exhibit a larger fraction of higher body wave phase velocities, ω, in both reversal and forward motion. (C, right) Probability of reversals longer that τrev, P(t > τrev) = 1 − P(t ≤ τrev) in the dwelling and roaming states. The roaming state generally exhibits longer reversals than dwelling, for which reversal bouts are extremely short. Thick lines indicate the CDF for the ensemble of worms, while lighter lines are for each individual. (D) The rate of reversal events with complete body waves is an order of magnitude higher in the roaming state compared to dwelling. For comparison we show also the reversal rate for worms foraging off-food [7, 9] (gray), which also exhibits an increased reversal rate. For such body wave analysis we identify forward and reversal events according to the sign of the phase velocity ω. (E) Body curvature θ as a function of time for example dwelling and roaming states. The dwelling state (left) exhibits incoherent body waves that do propagate through the entire body, whereas coherent full body waves are commonly observed in roaming (right). (F) Worms on-food exhibit a lower fraction of deep ventral turns. We show the probability distribution function (PDF) of the turning mode a3 for roaming, dwelling and foraging (gray) worms. Roaming worms exhibit a larger fraction of Ω-turns than dwelling worms and δ-turns are rare in on-food data: they are not observed in the full ∼ 66 hours of recordings.