Frictional force on each rod (A) Escaping behavior. The top panel represents the frictional force experienced by i-rod. As indicated on the color wheel to the right, the hue of this heatmap represents the direction of the force, and the saturation represents the magnitude of the force. The second panel from the top shows the magnitude of the frictional force . The third panel from the top represents the average (black solid line) of each column in the middle panel and the power (red dotted line), which is the amount of energy the worm consumes per unit time. The bottom panel represents the classification of the worm’s behavior (blue: forward locomotion, red: backward locomotion, green: turn) (The definitions of behavioral categories are in Methods). The triangles over each panel indicate the corresponding time of the snapshots depicted in Fig. 3C. (B) Delta-turn. The triangles over each panel indicate the corresponding time of the snapshots depicted in Fig. 3D.