Fig. 2: The utility of different behavioral controllers in open environments.

a Prey survival rate in pseudo-aquatic environments (Fig. 1a). The line plot shows the mean survival rate, and the surrounding fill indicates ±s.e.m across random initial predator locations (n = 20). Two-tailed Kruskal–Wallis (KW) test: H100 = 2.0, p = 0.57; H1000 = 55.5, p < 10−10; H5000 = 81.3, p < 10−16. b Mean change in survival rate across all the planning levels shown in (a) (see Methods). Horizontal line: mean; Shaded region: ±s.e.m; Box: 95% confidence interval of the mean; Vertical line: range of the data. n = 20 independent random initial predator locations. Mann–Whitney U (MWU) tests (two-tailed) across visual ranges (with Bonferroni correction: U1,2 = 54.0, U2,3 = 159.5, U3,4 = 127.5, and U4,5 = 63.0 (***p < 0.0001; n.s. is not significant p > 0.025) (KW over all visual ranges H = 55.4, p < 10−10). c Heatmaps of all action sequences taken by the prey that resulted in prey survival at the maximum planning level (5000 states), with color density proportional to frequency. Color bar action frequencies range from 1 to 206, dependent on visual range (for all paths see Supplementary Fig. 3). Survival paths are aggregated across all tested predator locations (n = 20) and the total number of episodes per predator location (n = 100). d Mean ± s.e.m. across random initial predator locations (n = 20) of survival rate for prey that uses habit (red dashed line). The planning data (blue solid line) is another representation of the plot shown in (a) at maximum planning level (±s.e.m across random initial predator locations; n = 20). KW test (two-tailed) for each visual range (with Bonferroni correction): H1 = 0.11, p1 = 0.74; H2 = 3.53, p2 = 0.30; H3 = 4.26, p3 = 0.20; H4 = 3.42, p4 = 0.32; H5 = 4.04, p5 = 0.22. Source data are provided as a Source Data file.