Models based on stochastic dynamic programming are recognized as one of the best ways of predicting the evolutionary endpoints for natural selection. In this section, we outline the structure of the SDP model from which we determine fitness-maximizing foraging behaviors of hominin species. First, we define energetic state and enamel volume as the state variables of the model, and describe the processes that govern how these state variables change over time. We also introduce three factors that influence an organism's state: (1) the probability of finding different amounts of food (including not finding it); (2) the probability of losing a given amount of enamel as a function of chewing different foods; and (3) the quality of the environment at a given time. Second, we introduce the fitness function, which depends upon the state of the organism and time. Starting at a fixed final time, we show one can iterate the fitness function backwards in time, thus determining both fitness at earlier times and foraging decisions (the decision matrix) as a function of state. As the current time moves further and further from the final time, the decision matrix becomes independent of time (stationary), only depending upon physiological state. Third, we combine the stationary decision matrices with a Monte Carlo simulation going forward in time (forward-iteration) to examine the consequences of different foraging behaviors as a function of an organism's anatomical attributes and/or its ability to externally modify its food.

#### STATE DYNAMICS

We model the foraging decisions of an organism as a function of two principle state variables: (1) its net energy reserves at time *t*, ; and (2) its enamel volume at time *t*, , where time is measured in days. We model a single unit of energy as 10 MJ, equivalent to 2388 kcal and roughly equal to the energy in 1 kg of animal tissue (Wolfram Research 2012). Accordingly, the maximum potential energy reserves for an organism, *x*_{max}, is its body size, such that for a 70 kg organism. A unit of molar enamel volume *v* corresponds to 100 mm^{3}. Specific properties of molar anatomy correlate with body size (Shellis et al. 1998), and we use these relationships to approximate maximal (i.e., unworn) molar enamel volume, *v*_{max} as a function of *x*_{max}, for both non-megadonts and megadonts (see Appendix S1 and Fig. S1). Both the potential energy gained from food and its impact on an organism's enamel change as a function of food mechanical properties. We consider an approximating measurement for the mechanical properties of food taking into account both the elasticity (Young's modulus, , [MPa]) and the fracture toughness (, [Jm^{−2}]) of food *i*, which approximates “hardness,” measured as (Lucas et al. 2008b). We let denote the digestibility of food *i* ranging between (indigestible) and (completely digestible; sensu Lucas et al. 2000). We assume that an individual dies when its energy reserves fall below or its enamel volume falls below *v*_{crit} (see Appendix S1).

We let (in units of *x*) denote an organism's energetic gains for food type *i* (Table 1). Because larger animals gain relatively more calories per foraging bout, energetic gain is calculated as , where the constant (1/2388) normalizes the energy density of foods to units of *x*, and the modifier ensures that gain scales weakly with body size. We assume that foraging behavior is governed primarily by caloric, or energetic, limitations (Rothman et al. 2011), and model the daily cost of foraging for food type *i*, (in units of *x*), as a function of an organism's body size, and the aggregation of food on the landscape. We modified the estimates of daily energetic expenditure (kcal/day) by Leonard and Robertson (1997) to model daily energetic cost, such that /2388, and resting metabolic rate (RMR) , where *C*_{1} is the activity constant ( for moderate activity), the constant (1/2388) operates as before, and is the mean encounter rate for food *i*, such that is proportional to foraging time. Foods that are encountered more frequently (high ) thus have lower per encounter foraging costs. We assessed a costlier version of the model, where /2388, where , accounting for additional daily costs independent of food choice Leonard and Robertson (1997).

Table 1. Parameters and variables in the dynamic state variable model. Parenthetical values (except for ) are with respect to the foods: (fruit, grass leaves, USOs, arthropods). Values for *E* and *R* are those when no mechanical advantage is included. See methods for relevant references. Auto. = AutocorrelatedParameter | Interpretation | Units | Value(s): Rich quality | Poor quality |
---|

| Energy reserves at time *t* | 10 [MJ] | State variable | |

| Enamel volume at time *t* | 100 [mm^{3}] | State variable | |

| Number of food items found | Count | Stochastic variable | |

| Basal enamel wear | [mm] | Stochastic variable | |

γ | Energetic gain | 10 [MJ] | (1.5, 0.3, 1.6, 3.2) | (1.4, 0.3, 1.4, 2.9) |

*c* | Energetic cost (minimal) | 10 [MJ] | (0.7, 0.5, 0.7, 2.2) | (1.1, 0.5, 0.7, 2.2) |

| Energetic cost (maximal) | 10 [MJ] | (1.4, 1.2, 1.4, 2.8) | (1.8, 1.2, 1.4, 2.8) |

ξ | Mean encounter rate | time^{−1} | (3, 4, 3, 1) | (2, 4, 3, 1) |

ν | Dispersion | NA | (3, 5, 3, 2) | (2, 4, 3, 1) |

η | Digestibility | NA | (0.9, 0.7, 0.8, 0.9) | Same |

*A* | Molar surface area | [mm^{2}] | | Same |

*b* | Slope of enamel wear | [mm/k] | 0.0425 | Same |

*E* | Young's modulus | [MPa] | (1, 10, 5, 200) | Same |

*R* | Fracture toughness | [Jm^{−2}] | (565, 330, 265, 1345) | Same |

| Expected basal enamel wear | μm | 0.24 | Same |

σ | Basal enamel wear SD | μm | 1.6 | Same |

*d* | Prob. of death at time *t* | NA | e^{−10} | Same |

| Habitat quality at time *t* | binary | r | p |

| Quality transition probability | | Wet (0.8, 0.2; 0.2, 0.8) | |

| matrix: | | Dry (0.2, 0.8; 0.8, 0.2) | |

| | | Auto. (0.8, 0.2; 0.8, 0.2) | |

Φ | Terminal fitness function () | | | |

*F* | Fitness function () | | | |

| Stationary decision matrix | | | |

| Expected future fitness | | | |

We identify four general food groups: (1) a nutritious, mechanically pliable, patchily distributed food (e.g., fruit); (2) a non-nutritious, mechanically hard, widely distributed food (e.g., leaves from C_{4}-photosynthetic grasses); (3) a nutritious, mechanically hard, widely distributed food (e.g., USOs); and (4) a highly nutritious, potentially hard, patchily distributed food (e.g., arthropods or more generally small quantities of animal tissue). We set the food energy density to be 717, 150, 785, and 1518 kcal/kg for fruit, grass leaves, USOs, and arthropods/animal tissue, respectively (Wolfram Research 2012). The mechanical properties of the food groups are measured by toughness [Jm^{−2}]: , and Young's modulus [MPa]; these are for fruits, grass leaves, USOs, and arthropods with fracture-resistant exoskeletons, respectively (Lucas 2004; Williams et al. 2005; Dominy et al. 2008; Yamashita et al. 2009). We used a conservatively low value for the fracture toughness of grass leaves in our model (; Lucas 2004). Although the fracture toughness of East African grasses is typically (N.J. Dominy, unpubl. data), we assume that a grazing primate with bunodont molars would selectively consume tender grass leaves.

Enamel volume decreases as an animal consumes resources. Although the underlying mechanisms of enamel loss are poorly understood (Lucas et al. 2008a), siliceous particulate matter is probably the most significant cause of abrasion (Lucas et al. 2012). We assume that hard foods (high values) promote increased use of the dentition (cf. Organ et al. 2011), and that such use induces wear regardless of the specific cause. We set enamel wear, , to be a function of: (1) the mechanical properties of food *i* and (2) a stochastic decrease in enamel volume (determined by Ω). Because enamel is a nonrenewable resource, this wear cannot be undone. Teaford and Oyen (1989) showed that the consumption time for vervet monkeys (*Chlorocebus*) that ate a diet of raw Purina monkey chow was 8× greater than that for vervets fed on premashed monkey chow. With respect to enamel wear, this is equivalent to chewing 8× as much food. Teaford and Oyen also showed that the enamel thickness decreased by about when vervets fed on the raw diet, versus ca. when they fed on the pre-mashed diet. We assumed a linear relationship between the loss of enamel thickness (Teaford and Oyen 1989), and consumption time, or, alternatively, the amount of food consumed, *k* (with a slope ). The lower bound of this relationship () represents the expected basal enamel wear that occurs irrespective of consumption, and we used it to parameterize the stochastic variable Ω. Accordingly, given that *A* is the molar enamel surface area and and are scaling constants denoting the average Young's modulus (50.44 MPa) and fracture toughness (1030.55 Jm^{−2}) of monkey chow, respectively (Williams et al. 2005), when *k* items of food type *i* are found in period *t*

- (2)

The constant 1/250 scales tooth wear to ensure the organism attains its expected longevity (Lindstedt and Calder III 1981), and accounts for (1) overestimation of molar enamel area (our allometric estimation includes the lateral aspects of molar surfaces); and (2) the notion that wear is a complex action affecting a small fraction of the occlusal surface at a given time (Lucas 2004).

Finally, we introduce changing habitat quality as a stochastic environmental variable that affects both the nutritional gains and foraging costs of foods at a given time. Habitat quality can be rich () or poor () at time *t*, and changes through time according to a transition probability matrix ), where—for example—ρ_{rp} is the probability of transitioning from a rich quality habitat at time *t* to a poor quality habitat at time . Changes in habitat quality alter energetic gain, the mean encounter rate, and the dispersion of different foods. We set energetic gain to decrease by 10% in poor quality habitats relative to rich-quality habitats. Moreover, the mean encounter rate () as well as the dispersion of food () are modified by , such that food resources are more easily found (higher ) and are less patchily distributed (higher ) in rich quality habitats (see Appendix S2 for a detailed derivation of dispersion and encounter rates of foods). USOs are stored underground and have evolved to retain high nutrient loads during periods of environmental stress (Copeland 2004). We incorporate this quality by holding the energetic gain, encounter rate, and dispersion of USOs constant, irrespective of habitat quality.

#### MAXIMIZING FITNESS BY FOOD CHOICE

We assume that natural selection has acted on behavioral decisions concerning diet (food choice) conditioned on energetic state, enamel volume, and the probability of transitioning from rich or poor habitat quality. We define fitness functions

- (4a)

- (4b)

where the maximization over *i* chooses the food that maximizes fitness given energy reserves, enamel volume, and habitat quality. By definition, at time *T*

For time periods before the terminal time , an organism must survive mortality independent of starvation or enamel loss and choose the fitness maximizing food, given the stochasticity in food encounter. If the probability of death in a single period is set to (*m* or , estimated for a subadult male chimpanzee; cf. Bronikowski et al. 2011), then and satisfy the equations of SDP, such that

- (5a)

- (5b)

where the expectation is taken with respect to the random variable Ω (eq. 2). These equations identify the food *i* that maximizes fitness for given energetic reserves , enamel volume , and habitat quality at time *t*. As equations (5a), (5b) are solved backward in time, in addition to obtaining the values of fitness, we create decision matrices and characterizing the optimal choice of food in a rich or poor environment given that and . Thus, the two decision matrices (for rich and poor quality) depend upon the habitat quality transition matrix , but we suppress that notation for ease of reading.