Individual behavioral performance during learning is known to be affected by modulatory factors, such as stress and motivation, and by genetic predispositions that influence sensitivity to these factors. Despite numerous studies, no integrative framework is available that could predict how a given animal would perform a certain learning task in a realistic situation. We found that a simple reinforcement learning model can predict mouse behavior in a hole-box conditioning task if model metaparameters are dynamically controlled on the basis of the mouse's genotype and phenotype, stress conditions, recent performance feedback and pharmacological manipulations of adrenergic alpha-2 receptors. We find that stress and motivation affect behavioral performance by altering the exploration-exploitation balance in a genotype-dependent manner. Our results also provide computational insights into how an inverted U-shape relation between stress/arousal/norepinephrine levels and behavioral performance could be explained through changes in task performance accuracy and future reward discounting.Animal behavior is guided by rewards that can be received in different situations and by modulatory factors such as stress and motivation. Acute stress can have positive or negative effects on learning and memory that depend on stressor properties (timing, duration and relation with the task) and on the predispositions of stressed individuals [1][2][3] . These effects are thought to be mediated through the modulation of synaptic plasticity by stress hormones and neuromodulators, such as glucocorticoids and norepinephrine [4][5][6][7] . However, their role in high-level processes such as learning, action selection and future reward discounting is not well understood. In addition to stress, genotype 8 , affective traits 9 , motivation 10 and recent performance feedback 11 also influence individual performance, but it may be difficult and inefficient to explicitly model each factor to accurately predict animal behavior.A number of models have related neuromodulatory systems to cognitive processes and to statistical quantities characterizing the environment 12,13 . Although such models provide insights into potential mechanisms, alone they are often unable to accurately predict animal behavior in a realistic situation as a result of the diversity of the modulatory factors affecting it. Here, we propose a method that can, in principle, quantify the influence of arbitrary modulatory factors on behavior as control parameters of a general behavioral model and that is exemplified here for the case of stress and genetic strain in mice.In modeling reward-based behavioral learning, approaches based on the theory of reinforcement learning 14 have been the most successful. They have been applied to explain experimental data in animal conditioning 10 , human decision-making 15 and addiction 16 . However, the modulatory role of stress and affective traits has not yet been considered. In reinforcement learning, modeled animals occupy different states cor...